compositor: Update grab variable in notify_key() after binding handler.

We need to update the temp grab pointer after weston_compositor_run_key_binding()
before calling the key handler because it may have installed a new grab.
This commit is contained in:
Scott Moreau 2012-06-11 14:59:31 -06:00 committed by Kristian Høgsberg
parent e9f68f66dc
commit befa65318a
1 changed files with 3 additions and 1 deletions

View File

@ -1839,9 +1839,11 @@ notify_key(struct wl_seat *seat, uint32_t time, uint32_t key,
*k = key;
}
if (grab == &seat->keyboard->default_grab)
if (grab == &seat->keyboard->default_grab) {
weston_compositor_run_key_binding(compositor, ws, time, key,
state);
grab = seat->keyboard->grab;
}
grab->interface->key(grab, time, key, state);
if (mods)