After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 750552 - "map" effect comes out wrong on wayland
"map" effect comes out wrong on wayland
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
git master
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2015-06-08 11:22 UTC by Carlos Garnacho
Modified: 2017-05-03 13:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
core: Refrain from showing wayland windows when we don't have a buffer yet (1.58 KB, patch)
2015-06-08 11:28 UTC, Carlos Garnacho
committed Details | Review
wayland: Ensure we queue a "calc showing" operation after we get a buffer (1013 bytes, patch)
2015-06-08 11:28 UTC, Carlos Garnacho
committed Details | Review
build: Fix non-wayland build (1.25 KB, patch)
2015-06-17 10:40 UTC, Ting-Wei Lan
committed Details | Review

Description Carlos Garnacho 2015-06-08 11:22:53 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.
Comment 1 Carlos Garnacho 2015-06-08 11:28:23 UTC
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.
Comment 2 Carlos Garnacho 2015-06-08 11:28:33 UTC
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.
Comment 3 Carlos Garnacho 2015-06-16 18:36:14 UTC
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
Comment 4 Ting-Wei Lan 2015-06-17 10:40:37 UTC
Created attachment 305469 [details] [review]
build: Fix non-wayland build

This fixes error introduced in 09120132ef87061d527b5324a14ab5950db3dc0a.
Comment 5 Jasper St. Pierre (not reading bugmail) 2015-06-23 23:38:10 UTC
Attachment 305469 [details] pushed as 6b82f61 - build: Fix non-wayland build


Thank you for the build fix. Sorry for missing this one earlier!