Currently xdg_toplevel_config size hints are ignored if the config has state 0 to avoid spurrious re-sizing. However, if the window is currently configured with a non-zero state, e.g. it is in fullscreen, then such an event from the compositor indicates a switch to a floating window, in which case the size hint should be respected.
Additionally, the check for whether the current size of a fullscreen window is compatible with the compositor requested size would always return true regardless of size. Reading the comments for `wayland_surface_config_is_compatible`, it seems that behavior is intended in the other places the function is used, so that call was replaced with a simple size comparison.
From: Aven Bross kieroda@gmail.com
Currently xdg_toplevel_config size hints are ignored if the config has state 0 to avoid spurrious re-sizing. However, if the window is currently configured with a non-zero state, e.g. it is in fullscreen, then such an event from the compositor indicates a switch to a floating window, in which case the size hint should be respected. --- dlls/winewayland.drv/window.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/winewayland.drv/window.c b/dlls/winewayland.drv/window.c index ce5b6bb5143..caf1a6f71ba 100644 --- a/dlls/winewayland.drv/window.c +++ b/dlls/winewayland.drv/window.c @@ -556,7 +556,7 @@ static void wayland_configure_window(HWND hwnd) state = surface->processing.state; /* Ignore size hints if we don't have a state that requires strict * size adherence, in order to avoid spurious resizes. */ - if (state) + if (state || surface->current.state) { width = surface->processing.width; height = surface->processing.height; @@ -598,9 +598,8 @@ static void wayland_configure_window(HWND hwnd) * are very insistent on a particular fullscreen size (which may not match * the monitor size). */ if ((surface->window.state & WAYLAND_SURFACE_CONFIG_STATE_FULLSCREEN) && - wayland_surface_config_is_compatible(&surface->processing, - window_surf_width, window_surf_height, - surface->window.state)) + window_surf_width <= surface->processing.width && + window_surf_height <= surface->processing.height) { flags |= SWP_NOSIZE; }