From a393e2ef33b1220fd8365f350202b0e7a12004e2 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Tue, 2 Oct 2018 17:49:19 +0200 Subject: [PATCH] wayland: Update saved size when maximized/fullscreen If a client issues a `move_resize()` request while the window is maximized or fullscreen, update the saved size for when it will be unmaximized/unfullscreened Related: https://gitlab.gnome.org/GNOME/gtk/issues/1044 --- gdk/wayland/gdkwindow-wayland.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c index 1c62c8f65e..b5d427ce31 100644 --- a/gdk/wayland/gdkwindow-wayland.c +++ b/gdk/wayland/gdkwindow-wayland.c @@ -3311,6 +3311,12 @@ gdk_window_wayland_move_resize (GdkWindow *window, } } + if (window->state & (GDK_WINDOW_STATE_FULLSCREEN | GDK_WINDOW_STATE_MAXIMIZED)) + { + impl->saved_width = width; + impl->saved_height = height; + } + /* If this function is called with width and height = -1 then that means * just move the window - don't update its size */