summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2018-08-27 17:49:52 +0200
committerJonas Ådahl <jadahl@gmail.com>2018-08-27 17:49:52 +0200
commite191c21e04cfaa560f8dd51f4f91013af98ccf4e (patch)
tree6e79ecd6fde18ff81e61efea1c06bc34a43b0872
parent5376c31a33020d7dc5a69b129f2dd4f42d0890a1 (diff)
downloadmutter-e191c21e04cfaa560f8dd51f4f91013af98ccf4e.tar.gz
window/wayland: Don't recursive indefinitely when updating monitor
When we update the main monitor, there is a rule that makes it so that popup windows use the same main monitor as their parent. In the commit f4d07caa38e51d09ee73bab20334a6b5c28952d6 the call that updates and fetches the main monitor of the toplevel accidentally changed to update from itself, causing a indefinite recursion eventually resulting in a crash. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/279
-rw-r--r--src/wayland/meta-window-wayland.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wayland/meta-window-wayland.c b/src/wayland/meta-window-wayland.c
index f73f3e104..42fcde7b0 100644
--- a/src/wayland/meta-window-wayland.c
+++ b/src/wayland/meta-window-wayland.c
@@ -392,7 +392,7 @@ meta_window_wayland_update_main_monitor (MetaWindow *window,
toplevel_window = meta_wayland_surface_get_toplevel_window (window->surface);
if (toplevel_window != window)
{
- meta_window_update_monitor (window, flags);
+ meta_window_update_monitor (toplevel_window, flags);
window->monitor = toplevel_window->monitor;
return;
}