mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
window/wayland: Always update monitor for non-user ops
meta_window_wayland_update_main_monitor() would skip the monitor update if the difference in scale between the old and the new monitor would cause another monitor change. While this is suitable when the monitor change results from a user interactively moving the surface between monitors of different scales, this can leave dangling pointers to freed monitors when this is triggered by a change of monitor configuration. Make sure we update the monitor unconditionally if not from a user operation. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/189
This commit is contained in:
parent
0f43f86341
commit
a3da4b8d5b
@ -413,6 +413,12 @@ meta_window_wayland_update_main_monitor (MetaWindow *window,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!user_op)
|
||||||
|
{
|
||||||
|
window->monitor = to;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
from_scale = meta_logical_monitor_get_scale (from);
|
from_scale = meta_logical_monitor_get_scale (from);
|
||||||
to_scale = meta_logical_monitor_get_scale (to);
|
to_scale = meta_logical_monitor_get_scale (to);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user