summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mader <robert.mader@posteo.de>2020-03-30 12:23:42 +0200
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2020-03-30 15:59:48 +0000
commit09a6031c699904f13136b8318aa17dce1ae40e43 (patch)
tree3b896f9352c4bec22197db58da69c82818831b3e
parentdbe919ef922368d952ff3f21db411d0160d4c42b (diff)
downloadmutter-09a6031c699904f13136b8318aa17dce1ae40e43.tar.gz
window-actor: Force full actor geometry sync when mapping
Normally we bail out in `sync_actor_geometry()`. The comment there states: ``` Normally we want freezing a window to also freeze its position; this allows windows to atomically move and resize together, either under app control, or because the user is resizing from the left/top. But on initial placement we need to assign a position, since immediately after the window is shown, the map effect will go into effect and prevent further geometry updates. ``` The signal for the initial sync originates in `MetaWindow` though and predates `xdg_toplevel_set_maximized`, which again calls `meta_window_force_placement`, triggering the signal too early. As a result, Wayland clients that start up maximized have a wrong map animation, starting in the top-left corner. In order to fix this without changing big parts of the geometry logic and risking regressions, force the initial sync again before mapping. Solution suggested by Jonas Ã…dahl. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1164
-rw-r--r--src/compositor/meta-window-actor.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 9724c0243..92355a918 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -856,6 +856,9 @@ meta_window_actor_show (MetaWindowActor *self,
g_assert_not_reached();
}
+ if (event == META_PLUGIN_MAP)
+ meta_window_actor_sync_actor_geometry (self, TRUE);
+
if (meta_compositor_is_switching_workspace (compositor) ||
!start_simple_effect (self, event))
{