GNOME Bugzilla – Bug 750552
"map" effect comes out wrong on wayland
Last modified: 2017-05-03 13:32:54 UTC
On wayland, the brief animation running when a new window is shown comes out at the wrong coordinates. This is what get us there: 1) We're calling meta_window_queue(window,...CALC_SHOWING) quite early on MetaWindow creation (and from a few places), this usually happens early on xdg_shell.get_xdg_surface. 2) Within the idle we don't check for buffer contents, so meta_window_show() is called even though the surface isn't ready yet. This triggers the "map" effect when the actor has a {0,0,0,0} rectangle. 3) On meta_window_actor_sync_actor_geometry() we avoid repositioning while there is an effect on the fly, the (now late) wl.surface_commit from the client sets the buffer, but window geometry is effectively ignored this way until the effect is done. As for solutions to this, I'd suggest either of: 1) Avoid all meta_window_queue(CALC_SHOWING) calls within meta_window_shared_new(), make that an explicity call. 2) Make the checks in the idle ignore requests on surfaces that didn't receive yet buffer and window geometry info, ensure we queue a request after we get these. 3) Both of the above I'm attaching a couple of patches that do #2.
Created attachment 304759 [details] [review] core: Refrain from showing wayland windows when we don't have a buffer yet The "calc showing" operation is queued in a few places alongside MetaWindow creation, we should be ignoring these until there is a buffer to show.
Created attachment 304760 [details] [review] wayland: Ensure we queue a "calc showing" operation after we get a buffer This will ensure the window is made visible, now that we ignore all previous petitions until we get a buffer.
Attachment 304759 [details] pushed as 0912013 - core: Refrain from showing wayland windows when we don't have a buffer yet Attachment 304760 [details] pushed as cdac4d0 - wayland: Ensure we queue a "calc showing" operation after we get a buffer
Created attachment 305469 [details] [review] build: Fix non-wayland build This fixes error introduced in 09120132ef87061d527b5324a14ab5950db3dc0a.
Attachment 305469 [details] pushed as 6b82f61 - build: Fix non-wayland build Thank you for the build fix. Sorry for missing this one earlier!