window: Implement input device grabbing
With all input events going to widgets now, we can grab an input device
to a widget, so that all events are delivered to that widgets handlers.
This lets us implement the last bit of the menu behaviour, that is
the client side grabbing of events. The result is that we can now pop down
the menu when we receive clicks in the clients own windows and we
don't send motion and button events to other widgets.
diff --git a/clients/window.h b/clients/window.h
index 051c690..b9be2af 100644
--- a/clients/window.h
+++ b/clients/window.h
@@ -358,6 +358,12 @@
uint32_t
input_get_modifiers(struct input *input);
+void
+input_grab(struct input *input, struct widget *widget, uint32_t button);
+
+void
+input_ungrab(struct input *input, uint32_t time);
+
struct wl_input_device *
input_get_input_device(struct input *input);