From a93ef84d577621359e667c86342fdd37c2bcd14e Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Wed, 18 Sep 2019 23:59:50 +0100 Subject: [PATCH] wayland/window: Provide prior floating window dimensions Implements the "prior window window geometry dimensions" as described in the documentation of 'xdg_toplevel' request 'unset_maximized': "If available and applicable, the compositor will include the window geometry dimensions the window had prior to being maximized in the configure event." and 'unset_fullscreen': "The compositor may include the previous window geometry dimensions in the configure event, if applicable." Fixes https://gitlab.gnome.org/GNOME/mutter/issues/792. --- src/wayland/meta-window-wayland.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/wayland/meta-window-wayland.c b/src/wayland/meta-window-wayland.c index 6f778568d..afb529cce 100644 --- a/src/wayland/meta-window-wayland.c +++ b/src/wayland/meta-window-wayland.c @@ -256,24 +256,8 @@ meta_window_wayland_move_resize_internal (MetaWindow *window, * to the Wayland surface. */ geometry_scale = meta_window_wayland_get_geometry_scale (window); - if (flags & META_MOVE_RESIZE_UNMAXIMIZE && - !meta_window_is_fullscreen (window)) - { - configured_width = 0; - configured_height = 0; - } - else if (flags & META_MOVE_RESIZE_UNFULLSCREEN && - !meta_window_get_maximized (window) && - meta_window_get_tile_mode (window) == META_TILE_NONE) - { - configured_width = 0; - configured_height = 0; - } - else - { - configured_width = constrained_rect.width / geometry_scale; - configured_height = constrained_rect.height / geometry_scale; - } + configured_width = constrained_rect.width / geometry_scale; + configured_height = constrained_rect.height / geometry_scale; /* For wayland clients, the size is completely determined by the client, * and while this allows to avoid some trickery with frames and the resulting