[mutter] window-actor: Force full actor geometry sync when mapping
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window-actor: Force full actor geometry sync when mapping
- Date: Mon, 30 Mar 2020 16:14:16 +0000 (UTC)
commit 09a6031c699904f13136b8318aa17dce1ae40e43
Author: Robert Mader <robert mader posteo de>
Date: Mon Mar 30 12:23:42 2020 +0200
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
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))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]