From 7e1c6ff2a28eea1b564156224dd410c53c360cc6 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Tue, 21 Jul 2015 16:12:49 +0200 Subject: screen: On monitors-changed, update the window monitor before resizing Since commit 14b0a83f64134fd6669d580558e10b4a225cb1d6 we store the main window monitor instead of computing it every time. This means that we must now ensure that it's updated before trying to use it which we do from meta_screen_resize_func() or else we'll crash on an assertion later on when removing a monitor: assertion failed: (which_monitor < workspace->screen->n_monitor_infos) https://bugzilla.gnome.org/show_bug.cgi?id=752674 --- src/core/screen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/screen.c b/src/core/screen.c index ca810d975..5fb498075 100644 --- a/src/core/screen.c +++ b/src/core/screen.c @@ -2388,12 +2388,12 @@ on_monitors_changed (MetaMonitorManager *manager, &changes); } - /* Queue a resize on all the windows */ - meta_screen_foreach_window (screen, META_LIST_DEFAULT, meta_screen_resize_func, 0); - /* Fix up monitor for all windows on this screen */ meta_screen_foreach_window (screen, META_LIST_INCLUDE_OVERRIDE_REDIRECT, (MetaScreenWindowFunc) meta_window_update_for_monitors_changed, 0); + /* Queue a resize on all the windows */ + meta_screen_foreach_window (screen, META_LIST_DEFAULT, meta_screen_resize_func, 0); + meta_screen_queue_check_fullscreen (screen); g_signal_emit (screen, screen_signals[MONITORS_CHANGED], 0); -- cgit v1.2.1