wayland/xdg-shell: update popup window monitor early
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Fri, 23 Sep 2016 21:12:56 +0000 (23:12 +0200)
committerPeter Michael Green <plugwash@raspbian.org>
Fri, 21 Oct 2016 23:24:13 +0000 (23:24 +0000)
As meta_window_place_with_placement_rule will trigger a configure event
being sent ensure that the popup is placed on the correct monitor first
to ensure the right scale factor is applied.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
https://bugzilla.gnome.org/show_bug.cgi?id=771841

Gbp-Pq: Name wayland-xdg-shell-update-popup-window-monitor-early.patch

src/wayland/meta-wayland-xdg-shell.c

index b1b377173b6ae32e16bcb024e2bd1ee91474e285..4e572dcd9d155693d42104e8ffcfd6c5c41ffb27 100644 (file)
@@ -793,8 +793,9 @@ finish_popup_setup (MetaWaylandXdgPopup *xdg_popup)
                                     &xdg_popup->parent_destroy_listener);
 
   window = meta_window_wayland_new (display, surface);
-  meta_window_place_with_placement_rule (window, &placement_rule);
   meta_wayland_surface_set_window (surface, window);
+  meta_window_update_monitor (window, FALSE);
+  meta_window_place_with_placement_rule (window, &placement_rule);
 
   if (seat)
     {