compositor: Setup for keyboard grabs.
This commit is contained in:
parent
447013d718
commit
ec286eb8e8
|
@ -1436,10 +1436,13 @@ 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);
|
||||
else
|
||||
device->grab_key = key;
|
||||
device->grab_time = time;
|
||||
} else {
|
||||
weston_compositor_idle_release(compositor);
|
||||
}
|
||||
|
||||
weston_compositor_run_binding(compositor, wd, time, key, 0, state);
|
||||
|
||||
|
@ -1455,9 +1458,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
|
||||
|
|
Loading…
Reference in New Issue