Closed ids1024 closed 7 months ago
Working on a fix right now, under_from_surface_tree
simply shouldn't handle everything in the filter, but use the processor properly.
children
contains the surface itself, so no this is otherwise right, the handling in the filter just breaks the order.
This issue occurs in Anvil or cosmic-comp, and probably other compositors.
Window::surface_under
callsunder_from_surface_tree
, which usesfrom_surface_downward
. Then:filter
is called on the parent surface. It setsfound
, since the pointer is within the input region of the parent surface.post_filter
isn't called yet; it's called after iterating over subsurfaces.place_above
/place_below
haven't been used to change the stacking order. This may or may not setfound
, depending on whether or not the pointer is over the subsurface.post_filter
is invoked, and returnsfalse
. Sincefound
has been set (either to the parent surface, or the first subsurface)So there seem there are two issues here:
from_surface_downward
iterates over subsurfaces before calling thepost_filter
, which doesn't seem to be howunder_surface_from_tree
expects the function to behave. Is this is correct forfrom_surface_downward
,under_surface_from_tree
could be changed to useTraversalAction::SkipChildren
whenfound
is set.Not sure how correct the other functions dealing with the surface tree are. More testing could be helpful; not sure what tests wlcs has for that.