GNOME Bugzilla – Bug 738890
Subsurfaces don't receive any input event
Last modified: 2014-11-24 13:45:52 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.
Created attachment 288977 [details] [review] wayland: Avoid MetaWindow call on non window-backed surfaces Crossing events may also be gotten on subsurfaces.
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.
Review of attachment 288977 [details] [review]: Sure.
Review of attachment 288978 [details] [review]: Yep.
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
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.
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.
Review of attachment 291302 [details] [review]: Whoops. Nice catch.
Attachment 291302 [details] pushed as e96eb0e - compositor: Always recurse over surface children actors when picking