window/wayland: Always update monitor for non-user ops
authorOlivier Fourdan <ofourdan@redhat.com>
Mon, 18 Jun 2018 10:39:11 +0000 (12:39 +0200)
committerSimon McVittie <smcv@debian.org>
Tue, 31 Jul 2018 14:35:03 +0000 (15:35 +0100)
commitfd7173fb13c195ac6783c1b113bc7c3045eec1e0
tree276bf75f0be3f11d0c5ee1761068bd26684f7fbe
parentc38b590baae6661d2b63515dbc87ada489d3fc7f
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
(cherry picked from commit a3da4b8d5bd217c0262fd9361036877d155a300f)

Bug-GNOME: https://gitlab.gnome.org/GNOME/mutter/issues/189
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1784398
Applied-Upstream: 3.28.4, commit:https://gitlab.gnome.org/GNOME/mutter/commit/d74a04606

Gbp-Pq: Name window-wayland-Always-update-monitor-for-non-user-ops.patch
src/wayland/meta-window-wayland.c