mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
window-actor/wayland: Do not crash when there is no monitor
When all monitors are blanking or after suspending there might not be any monitors temporarily. We can't draw a black background when we don't know the size of the monitor it's fullscreen on but it's fine because there actually is no monitor. Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2508 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2695>
This commit is contained in:
parent
e331e38a19
commit
d6d6dc65c1
@ -420,6 +420,9 @@ maybe_configure_black_background (MetaWindowActorWayland *self,
|
||||
geometry_scale = meta_window_actor_get_geometry_scale (window_actor);
|
||||
|
||||
logical_monitor = meta_window_get_main_logical_monitor (window);
|
||||
if (!logical_monitor)
|
||||
return FALSE;
|
||||
|
||||
fullscreen_layout = meta_logical_monitor_get_layout (logical_monitor);
|
||||
|
||||
clutter_actor_iter_init (&iter, CLUTTER_ACTOR (self->surface_container));
|
||||
|
Loading…
Reference in New Issue
Block a user