input: Move surface picking into the pointer grab focus callback
authorKristian Høgsberg <krh@bitplanet.net>
Thu, 9 May 2013 02:02:59 +0000 (22:02 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 9 May 2013 02:03:45 +0000 (22:03 -0400)
commit6848c256778e2c1f603bc054bdda9cc71a23af29
treeac432b2b60ed27d629db9ff7ff3a5ecafd7b22d3
parentbe6403ed5c4fdab884d391778e2572aae109f1a0
input: Move surface picking into the pointer grab focus callback

Currently the core input code does surface picking before calling into
the focus callback of the current grab.  Not all grabs need to pick a
surface however, so we're doing work we don't have to in those cases.

For example, the shell move and resize grabs don't need to pick and the
default grab in implicit grab mode doesn't either.

With this change, the pointer grab mechanism is now very simple:
the focus callback is called whenever the pointer may have a new focus,
the motion callback is called whenever the pointer moves and
the button callback whenever a button is pressed or released.
src/compositor.c
src/compositor.h
src/data-device.c
src/input.c
src/shell.c