From a8ceceed1a6d381cffc6b52f6d1422381ad34672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 21 Apr 2017 17:40:25 +0800 Subject: [PATCH] window/wayland: Don't try to resize window on tear down When terminating mutter running as a display server, don't try to resize maximized windows when unmanaging, as at this point, they will have no MetaWaylandSurface. Originally this was done instead of setting the net_wm_state to not mess with future window managers, but when we're a Wayland compositor, this does not matter. https://bugzilla.gnome.org/show_bug.cgi?id=782156 --- src/core/window.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/window.c b/src/core/window.c index e35ed0838..f15392df7 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -2957,7 +2957,11 @@ unmaximize_window_before_freeing (MetaWindow *window) window->rect = window->saved_rect; set_net_wm_state (window); } - else if (window->screen->closing) /* See bug #358042 */ + else if (window->screen->closing /* See bug #358042 */ +#ifdef HAVE_WAYLAND + && !meta_is_wayland_compositor () +#endif + ) { /* Do NOT update net_wm_state: this screen is closing, * it likely will be managed by another window manager