weston/xwayland
Alexandros Frantzis 2acd2c7489 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 ba82af938a
"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: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Co-authored-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2023-02-28 19:13:22 +02:00
..
dnd.c libweston: correct argument name in the handler of wl_data_source.accept 2022-04-14 12:05:57 +00:00
hash.c Make config.h inclusion consistent 2016-06-16 11:01:54 -07:00
hash.h include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
launcher.c xwayland: Fix user after free on shutdown 2022-01-21 11:42:03 +00:00
meson.build build: fix meson deprecation warnings 2023-01-31 09:43:41 +02:00
selection.c xwm: Assert if we try to fetch our own selection 2022-12-07 10:03:37 +02:00
window-manager.c xwayland: Handle shell hint for client to choose dimensions 2023-02-28 19:13:22 +02:00
xwayland-internal-interface.h libweston-desktop: Add get_position 2022-06-29 11:44:48 +00:00
xwayland.h xwm: Fix selection if no seat present at startup 2022-12-07 10:03:37 +02:00