From 09a6031c699904f13136b8318aa17dce1ae40e43 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Mon, 30 Mar 2020 12:23:42 +0200 Subject: [PATCH] window-actor: Force full actor geometry sync when mapping MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/compositor/meta-window-actor.c | 3 +++ 1 file changed, 3 insertions(+) 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)) {