New grab API
This commit changes the way struct wl_grab works in a couple of ways: - The grab itself now decides when it ends instead of hardcoding button up as the terminating event. We remove the end vfunc since a grab now always know when it ends and can just clean up at that point. - We add a new focus vfunc that is invoked every time the pointer enters a new surface, regardless of any grabs. The callback receives the surface and the surface-relative pointer coordinates. The callback lets a grab send enter/leave events and change the grab focus. - The grab has a focus surface, wich determines the coordinate space for the motion callback coordinates. - The input device always tracks the current surface, ie the surface that currently contains the pointer, and coordinates relative to that surface. With these changes, we will be able to pull the core input event delivery and the drag and drop grab into the core wayland-server library.
Showing with 24 additions and 54 deletions