summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2015-07-21 16:12:49 +0200
committerRui Matos <tiagomatos@gmail.com>2015-07-21 16:46:09 +0200
commit7e1c6ff2a28eea1b564156224dd410c53c360cc6 (patch)
tree8ae7a1ffe473778a54b97a442bc057dfe5e109e8
parent2fb8da0d5aaa2389ad3fbf5bd15864a69502cb94 (diff)
downloadmutter-7e1c6ff2a28eea1b564156224dd410c53c360cc6.tar.gz
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
-rw-r--r--src/core/screen.c6
1 files 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);