monitor-manager: Reload monitor manager in idle callback
When a virtual stream is destroyed, its respective virtual monitor is destroyed too. When the virtual monitor is destroyed, mutter reloads the monitor manager. However, at this point, the virtual stream is not completely destroyed yet. The viewport of the virtual monitor still exists at this point and when the monitor manager reloads, it will try to fetch the logical monitor of the now destroyed virtual monitor, which will fail and thus gnome-shell will run into a segfault. Fix this situation by reloading the monitor manager in an idle callback. When the monitor manager reloads, the virtual monitor is completely gone, since the viewport of the virtual monitor is destroyed after the virtual monitor itself. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2864 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3307>
This commit is contained in:
@ -146,6 +146,7 @@ meta_test_cursor_hotplug (void)
|
||||
meta_wayland_test_client_finish (test_client);
|
||||
|
||||
g_clear_object (&virtual_monitor);
|
||||
meta_wait_for_monitors_changed (test_context);
|
||||
meta_wait_for_paint (test_context);
|
||||
}
|
||||
|
||||
@ -207,6 +208,7 @@ meta_test_hotplug_multi_view_invalidation (void)
|
||||
|
||||
g_signal_handler_disconnect (cursor_sprite, texture_changed_handler_id);
|
||||
g_clear_object (&virtual_monitor);
|
||||
meta_wait_for_monitors_changed (test_context);
|
||||
meta_wait_for_paint (test_context);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user