window.c: Prevent key event delivery while a grab is active
Ideally, we'll update the key event handling to deliver events to widgets, but in the meantime, just blocking key event delivery while a grab is active goes a long way.
This commit is contained in:
parent
41f7ebc36a
commit
c31f624141
@ -2876,6 +2876,14 @@ keyboard_handle_key(void *data, struct wl_keyboard *keyboard,
|
|||||||
if (!window || !input->xkb.state)
|
if (!window || !input->xkb.state)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/* We only use input grabs for pointer events for now, so just
|
||||||
|
* ignore key presses if a grab is active. We expand the key
|
||||||
|
* event delivery mechanism to route events to widgets to
|
||||||
|
* properly handle key grabs. In the meantime, this prevents
|
||||||
|
* key event devlivery while a grab is active. */
|
||||||
|
if (input->grab && input->grab_button == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
num_syms = xkb_key_get_syms(input->xkb.state, code, &syms);
|
num_syms = xkb_key_get_syms(input->xkb.state, code, &syms);
|
||||||
|
|
||||||
sym = XKB_KEY_NoSymbol;
|
sym = XKB_KEY_NoSymbol;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user