wl_backend: fall back to modalView for key event routing
When focusInfo has no target, route key events to the modal view so text fields in modal dialogs (run dialog) receive input.
This commit is contained in:
parent
81f60abca7
commit
d883166d4c
|
|
@ -1698,6 +1698,8 @@ handle_keyboard_key(struct wl_listener *listener, void *data)
|
|||
W_FocusInfo *finfo = wmscr->focusInfo;
|
||||
W_View *target = (finfo && finfo->focused) ? finfo->focused
|
||||
: (finfo && finfo->toplevel) ? finfo->toplevel : NULL;
|
||||
if (!target && wmscr->modalView)
|
||||
target = wmscr->modalView;
|
||||
ev.window = target ? (WNativeWindow)target->window : WNATIVE_NONE;
|
||||
|
||||
ev.u.key.keycode = keycode;
|
||||
|
|
|
|||
Loading…
Reference in New Issue