We're currently using the hack of telling mutter that our effect is completed (even though it isn't) in order to unfreeze updates of the window actor.
This causes a bug with detecting the wl_outputs a window is visible on, because the MetaWindowActor emits its "effects-completed" signal too early, making Mutter update the wl_outputs while we're doing the animation.
Now since meta_wayland_actor_surface_is_on_logical_monitor() uses the transformed position and size of the MetaSurfaceActor and is being called right after we setup the animation (but before it actually starts, that happens at the next paint cycle) it will use a "very wrong" rectangle: The transformation has been set to move the actor back to its old position, and while we did already unfreeze updates and called clutter_actor_set_position() in meta_window_actor_sync_actor_geometry(), the actual allocation is not updated yet; this makes clutter_actor_get_transformed_position() return a position including in the new transformation, but not including the new allocation, and the rectangle ends up being moved to the next monitor or completely out of the stage.
To fix this issue properly, we need to decouple unfreezing actor updates from emitting the "effects-completed" signal, which is now possible with the new meta_window_actor_freeze_updates() and meta_window_actor_thaw_updates() APIs. So use those new methods to freeze and thaw actor updates ourselves and make sure to call shellwm.completed_size_change() only after the animation has finished.
Depends on mutter!1250 (merged)
Fixes mutter#513 (closed)