input: Remove 'current' and related fields from weston_pointer
authorKristian Høgsberg <krh@bitplanet.net>
Wed, 8 May 2013 20:47:00 +0000 (16:47 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 8 May 2013 20:47:06 +0000 (16:47 -0400)
commite122b7ba58bf321a2e5c8fdadf17aa1ef511f30a
tree043e6cacf693781559f345d753ed4479aea89ed9
parentdba25868bc3ce2507396e7b9cce5abf9a1a01548
input: Remove 'current' and related fields from weston_pointer

The current surface field was used to track the surface the pointer was
currently over along with pointer position relative to that surface,
regardless of implicit or explicit grabs.  The main purpose was to restore
the default grab when another grab terminated.  We can now just repick in
that case and avoid keeping that state around, with the destroy listener
overhead that involves.

There was one other use case - we used to optimize out calls to
weston_pointer_set_focus() if the focus didn't actually change.  We can
still do that, but we have to do that in the default_grab_focus() handler
and compare against weston_pointer->focus instead.
src/compositor.h
src/input.c
src/shell.c