Skip to content

window-actor: Force full actor geometry sync when mapping

Robert Mader requested to merge rmader/mutter:initial-sync-wayland into master

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.

Fixes gnome-shell#1811 (closed) and fixes #426 (closed). Alternative to !937 (closed)

Merge request reports