mirror of
https://github.com/brl/mutter.git
synced 2024-11-27 02:20:43 -05:00
wayland: Don't crash when trying to fullscreen on inert wl_output
There is a race where an output can be used as a fullscreen target, but
it has already been removed due to a hotplug. Handle this gracefully by
ignoring said output in such situations.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1120
(cherry picked from commit 512bb7d1cd
)
This commit is contained in:
parent
7655a63af6
commit
57992f37cc
@ -434,7 +434,7 @@ zxdg_toplevel_v6_set_fullscreen (struct wl_client *client,
|
|||||||
if (output_resource)
|
if (output_resource)
|
||||||
{
|
{
|
||||||
MetaWaylandOutput *output = wl_resource_get_user_data (output_resource);
|
MetaWaylandOutput *output = wl_resource_get_user_data (output_resource);
|
||||||
if (output)
|
if (output && output->logical_monitor)
|
||||||
meta_window_move_to_monitor (window, output->logical_monitor->number);
|
meta_window_move_to_monitor (window, output->logical_monitor->number);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -431,7 +431,7 @@ xdg_toplevel_set_fullscreen (struct wl_client *client,
|
|||||||
{
|
{
|
||||||
MetaWaylandOutput *output = wl_resource_get_user_data (output_resource);
|
MetaWaylandOutput *output = wl_resource_get_user_data (output_resource);
|
||||||
|
|
||||||
if (output)
|
if (output && output->logical_monitor)
|
||||||
{
|
{
|
||||||
meta_window_move_to_monitor (window,
|
meta_window_move_to_monitor (window,
|
||||||
output->logical_monitor->number);
|
output->logical_monitor->number);
|
||||||
|
Loading…
Reference in New Issue
Block a user