window: Ignore input events from subsurfaces
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Tue, 6 May 2014 12:25:40 +0000 (15:25 +0300)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 12 May 2014 19:50:00 +0000 (12:50 -0700)
commita57c9f1b90a14bbbd5de217f1e44bd443cd3783f
treed4693a2e8d24714f4fbf653572c306fc162643f3
parent15f8563524943c4e2cddc4560663b6cc8fa5f881
window: Ignore input events from subsurfaces

Toytoolkit was not designed to handle input from subsurfaces and
instead it expects subsurfaces to have an empty input region. That way
input events for subsurfaces are generated on the main surface and
there is no need to convert coordinates before reporting the event to
the user.

However it is possible that a subsurface has a non-empty input region,
but in that case those events aren't properly processed. The function
window_find_widget() assumes the coordinates are in the main surface
coordinate space, and ends up chosing the wrong widget.

This patch changes the input code to completely ignore input events from
subsurfaces. This option was chosen instead of ensuring that the input
region on those surfaces is always empty since there's no enforcement
that a subsurface should completely overlap with the main surface. If
an event happens in the area of the surface that doesn't overlap, the
event could cause a completely unrelated surface to be picked.

https://bugs.freedesktop.org/show_bug.cgi?id=78207
clients/window.c