Skip to content

clients/fullscreen: Add option to map window fullscreen

I thought it would be useful to have a test client that initially maps a surface fullscreen.

This demonstrates a difference in behaviour where Mutter always maps the surface to the main output whereas kwin and weston both map it to the display the cursor is on, as they would a window.

As the surface is initially the size of your screen it ignores the -w and -h options, and the windows saved_allocation is set to the resolution of the output it's mapped to. This means it doesn't change size when transitioning to a windowed state.
I'm not sure if this is something that needs to be fixed. It could be fixed by exposing a window_set_saved_allocation function, or setting saved_allocation to pending_allocation on the initial configure, assuming that doesn't cause issues.

I added a second change that saves the pending allocation on the configure event if the window is fullscreen. Hopefully this allows for an initially fullscreened surface to be windowed to a set size without causing any issues.

Edited by Colin Kinloch

Merge request reports

Loading