servo icon indicating copy to clipboard operation
servo copied to clipboard

servoshell: add fullscreen option

Open MarybethGasman opened this issue 2 years ago • 3 comments

These changes add a cli option to start servo in fullscreen mode. As requested in #30599. It is currently in draft form as we need to have further discussions to determine whether we truly need it.

servo --fullscreen

No tests for now.

MarybethGasman avatar Oct 25 '23 05:10 MarybethGasman

🔨 Triggering try run (#6846095678) with platforms=windows and layout=none

github-actions[bot] avatar Nov 13 '23 05:11 github-actions[bot]

✨ Try run (#6846095678) succeeded.

github-actions[bot] avatar Nov 13 '23 06:11 github-actions[bot]

Appreciate your advice. I call set_fullscreen on our headed Window before returning it.

It works as expected when launching. image

When I refresh page, the web content seems not displayed in fullscreen mode. image

And I can't exit fullscreen mode or servo by Esc.

The Esc problem is because fullscreen is a whatwg web api. It will do nothing if there is no fullscreen element in the document. So I change the code to always Send EmbedderMsg first.

The web content not in fullscreen problem is solved by call .with_maximized on the window builder. I have no idea why. Am I missing something?

MarybethGasman avatar Nov 15 '23 23:11 MarybethGasman