Commit 7e1c6ff2 authored by Rui Matos's avatar Rui Matos

screen: On monitors-changed, update the window monitor before resizing

Since commit 14b0a83f 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
parent 2fb8da0d
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment