From ff799a1abed9075aef2ef6def4c6bfaf2cbdac37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 1 Nov 2019 13:40:04 +0100 Subject: [PATCH] window: Reset tile monitor number when untiling Otherwise we'll end up trying to access the out of date state later. Fixes the following test failure backtrace: #0 _g_log_abort () #1 g_logv () #2 g_log () #3 meta_monitor_manager_get_logical_monitor_from_number () #4 meta_window_get_work_area_for_monitor () #5 meta_window_get_tile_area () #6 constrain_maximization () #7 do_all_constraints () #8 meta_window_constrain () #9 meta_window_move_resize_internal () #10 meta_window_tile () https://gitlab.gnome.org/GNOME/mutter/merge_requests/912 --- src/core/window.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/window.c b/src/core/window.c index 5a0fdff63..b7894ecbb 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -3191,7 +3191,10 @@ meta_window_tile (MetaWindow *window, /* Don't do anything if no tiling is requested */ if (window->tile_mode == META_TILE_NONE) - return; + { + window->tile_monitor_number = -1; + return; + } if (window->tile_mode == META_TILE_MAXIMIZED) directions = META_MAXIMIZE_BOTH;