Skip to content
Commit 2acd2c74 authored by Alexandros Frantzis's avatar Alexandros Frantzis Committed by Marius Vlad
Browse files

xwayland: Handle shell hint for client to choose dimensions



A config event with width == 0 or height == 0 from the shell is a hint
to the client to choose its own dimensions. Since X11 clients don't
support such hints we make a best guess by trying to use the last saved
dimensions or, as a fallback, the current dimensions.

This hint is mainly used by libweston/desktop shells when transitioning
to a normal state from maximized, fullscreen or after a resize [1].
Without support for this hint the aforementioned transition causes
xwayland surfaces to be configured to a 1x1 size.

To be able to use the last saved dimensions with xwayland surface, the
shell needs to first set the maximized/fullscreen state and only then
set the new size, which is currently the case for desktop-shell.
Otherwise, if the new size is set first, then the last saved dimensions
will be set to the fullscreen/maximized values and won't be useful when
restoring to a normal window size.

[1] Recently we've introduced ba82af93
"desktop-shell: do not forget to reset pending config size after
resizes". As we were not handling the 0x0 size hint, resizing X
applications started to fail. This patch fixes that.

Signed-off-by: default avatarAlexandros Frantzis <alexandros.frantzis@collabora.com>
Signed-off-by: default avatarLeandro Ribeiro <leandro.ribeiro@collabora.com>
Co-authored-by: default avatarLeandro Ribeiro <leandro.ribeiro@collabora.com>
parent 12a7e4e1
Loading
Loading
Loading
Pipeline #818598 passed with stages
in 1 minute and 29 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment