[PATCH 2/2] compositor: Setup for keyboard grabs.
Scott Moreau
oreaus at gmail.com
Fri Feb 17 09:00:53 PST 2012
---
src/compositor.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/compositor.c b/src/compositor.c
index b4e9749..86a87f5 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1459,8 +1459,11 @@ notify_key(struct wl_input_device *device,
struct weston_compositor *compositor = wd->compositor;
uint32_t *k, *end;
- if (state)
+ if (state) {
weston_compositor_idle_inhibit(compositor);
+ device->grab_key = key;
+ device->grab_time = time;
+ }
else
weston_compositor_idle_release(compositor);
@@ -1478,9 +1481,8 @@ notify_key(struct wl_input_device *device,
*k = key;
}
- if (device->keyboard_focus_resource)
- wl_resource_post_event(device->keyboard_focus_resource,
- WL_INPUT_DEVICE_KEY, time, key, state);
+ device->keyboard_grab->interface->key(device->keyboard_grab,
+ time, key, state);
}
WL_EXPORT void
--
1.7.4.1
More information about the wayland-devel
mailing list