input: Get rid of grab focus concept
authorKristian Høgsberg <krh@bitplanet.net>
Thu, 9 May 2013 01:03:21 +0000 (21:03 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 9 May 2013 01:03:23 +0000 (21:03 -0400)
commitbe6403ed5c4fdab884d391778e2572aae109f1a0
tree88791c42c0dce25c3de6a5cda23b72ce2e54dce1
parente122b7ba58bf321a2e5c8fdadf17aa1ef511f30a
input: Get rid of grab focus concept

This was another complication that we had to have to support the
split between libwayland-server and weston.  Different grabs want to send
events relative to different surfaces at different times.  The default
grab switches between sending coordinates relative to the 'current' surface,
that is the surface the pointer is currently above, or the 'clicked'
surface, in case of an implicit grab.

The grab focus was set by the grab implementation and the core input code
would transform the pointer position to surface relative coordinates for the
grab focus and store in grab->x/y.

Now we can just let the grab implementation transform the pointer
coordinates itself, leaving the implementation free to transform
according to whichever surface it wants.  Or not transform at all if
it doesn't need surface relative coordinates (like the shell move and resize
grabs).
src/compositor.h
src/data-device.c
src/input.c
src/shell.c