Yeah, I think this looks ok. Reviewed-by: Jason Ekstrand <[email protected]>
On Mon, Jul 28, 2014 at 4:06 AM, Pekka Paalanen <[email protected]> wrote: > From: Pekka Paalanen <[email protected]> > > It looks like that in the great conversion introducing weston_view, one > conditional was forgotten from the code that builds the global flat list > of views. Sub-surfaces are added to the view list specially, as they are > not governed by their presence in a layer's view list, and therefore > need an explicit check for mappedness. > > The bug, missing the explicit check, caused sub-surfaces to enter the > global view_list regardless of their state. This lead to the pointer > focus picking code processing them, and as the input region defaults to > infinite, picking these unmapped surfaces. Clients then get confused > about the wl_pointer.enter events with unexpected wl_surface. > > To trigger this issue, it is enough to just create one additional > wl_surface and make it a sub-surface of a main surface that is or gets > mapped. Literally, just a wl_subsomcpositor_get_subsurface() call is > enough. At some point later, the unmapped sub-surface will get pointer > focus, depending on view stacking order. > > Fix the issue by adding a is_mapped check when building the view_list. > > Note, that 95ec0f95aa2df74c2da19e7dda24528fa8f765cc accidentally also > prevents this bug from happening, because it adds a test against the > transform.masked_boundingbox in weston_compositor_pick_view(). > > Reported-by: George Kiagiadakis <[email protected]> > Signed-off-by: Pekka Paalanen <[email protected]> > Cc: Jason Ekstrand <[email protected]> > --- > src/compositor.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/compositor.c b/src/compositor.c > index 02f569f..1e17583 100644 > --- a/src/compositor.c > +++ b/src/compositor.c > @@ -1751,6 +1751,9 @@ view_list_add_subsurface_view(struct > weston_compositor *compositor, > struct weston_subsurface *child; > struct weston_view *view = NULL, *iv; > > + if (!weston_surface_is_mapped(sub->surface)) > + return; > + > wl_list_for_each(iv, &sub->unused_views, surface_link) { > if (iv->geometry.parent == parent) { > view = iv; > -- > 1.8.5.5 > > _______________________________________________ > wayland-devel mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/wayland-devel >
_______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
