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 738890 - Subsurfaces don't receive any input event
Subsurfaces don't receive any input event
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: 2014-10-20 18:13 UTC by Carlos Garnacho
Modified: 2014-11-24 13:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: Avoid MetaWindow call on non window-backed surfaces (1.50 KB, patch)
2014-10-20 18:14 UTC, Carlos Garnacho
committed Details | Review
compositor: Ensure child actors are included in picking (1.45 KB, patch)
2014-10-20 18:14 UTC, Carlos Garnacho
committed Details | Review
compositor: Always recurse over surface children actors when picking (1.95 KB, patch)
2014-11-23 12:37 UTC, Carlos Garnacho
committed Details | Review

Description Carlos Garnacho 2014-10-20 18:13:36 UTC
I couldn't trace in the end the source commit for this bug, but it seems the subsurface actors are entirely unable to receive pointer/touch events if the parent surface has an input shape set. It turns out that the shaped picking on the MetaSurfaceActor forgets about iterating through children, leaving these out of all pick operation.

After the obvious fix, I also found a crash assuming MetaWindow-backed surfaces, which I'm attaching a patch for too.
Comment 1 Carlos Garnacho 2014-10-20 18:14:25 UTC
Created attachment 288977 [details] [review]
wayland: Avoid MetaWindow call on non window-backed surfaces

Crossing events may also be gotten on subsurfaces.
Comment 2 Carlos Garnacho 2014-10-20 18:14:29 UTC
Created attachment 288978 [details] [review]
compositor: Ensure child actors are included in picking

If the actor surface has an input mask, custom picking is implemented
for the portions affected by the mask, although the child actors (most
usually subsurfaces) are left out.
Comment 3 Jasper St. Pierre (not reading bugmail) 2014-10-21 18:46:23 UTC
Review of attachment 288977 [details] [review]:

Sure.
Comment 4 Jasper St. Pierre (not reading bugmail) 2014-10-21 18:46:31 UTC
Review of attachment 288978 [details] [review]:

Yep.
Comment 5 Carlos Garnacho 2014-10-23 14:55:10 UTC
Attachment 288977 [details] pushed as 7c5989c - wayland: Avoid MetaWindow call on non window-backed surfaces
Attachment 288978 [details] pushed as 700d367 - compositor: Ensure child actors are included in picking
Comment 6 Carlos Garnacho 2014-11-23 12:37:15 UTC
Reopening, unfortunately the second patch wasn't fully correct... children must be recursed both whether the input shape is NULL or not, the default ClutterActor::pick implementation only recurses within children itself if the vfunc is untouched, which it isn't, MetaSurfaceActor pick implementation must recurse in that case too.
Comment 7 Carlos Garnacho 2014-11-23 12:37:40 UTC
Created attachment 291302 [details] [review]
compositor: Always recurse over surface children actors when picking

The parent pick() implementation in ClutterActor only recurses if the
vfunc is untouched, which means it's up to the MetaWaylandSurface
implementation to actually recurse, just the same as if an input mask
applied.
Comment 8 Jasper St. Pierre (not reading bugmail) 2014-11-23 17:33:19 UTC
Review of attachment 291302 [details] [review]:

Whoops. Nice catch.
Comment 9 Carlos Garnacho 2014-11-24 13:45:48 UTC
Attachment 291302 [details] pushed as e96eb0e - compositor: Always recurse over surface children actors when picking