diff --git a/WINGs/wevent_wl.c b/WINGs/wevent_wl.c index 608eaf3..daf3d91 100644 --- a/WINGs/wevent_wl.c +++ b/WINGs/wevent_wl.c @@ -155,7 +155,7 @@ wl_flush(void *ectx, Bool discard) /* Pump the wlroots event loop so pointer/key events arrive in our queue. * This is called from waitForEvent/WMMaskEvent when the queue is empty. */ if (ctx->dispatch_fn) - ctx->dispatch_fn(0, ctx->dispatch_ud); + ctx->dispatch_fn(16, ctx->dispatch_ud); } static int diff --git a/WINGs/wview_wl.c b/WINGs/wview_wl.c index e9304c0..6207f6e 100644 --- a/WINGs/wview_wl.c +++ b/WINGs/wview_wl.c @@ -39,8 +39,10 @@ W_View *W_GetViewForWindow(Window id) unsigned slot = (idx + i) % VIEW_TABLE_SIZE; if (view_table[slot].id == id) return view_table[slot].view; - if (view_table[slot].id == 0) + if (view_table[slot].id == 0) { + wwarning("W_GetViewForWindow: id=0x%lx NOT FOUND (slot %u empty)", (unsigned long)id, slot); return NULL; + } } return NULL; } diff --git a/src/backend/wayland/wl_backend.c b/src/backend/wayland/wl_backend.c index fa59118..8ad8bf7 100644 --- a/src/backend/wayland/wl_backend.c +++ b/src/backend/wayland/wl_backend.c @@ -1658,9 +1658,10 @@ handle_keyboard_key(struct wl_listener *listener, void *data) W_WL_EnqueueEvent(wmscr, &ev, NULL); } - /* Forward non-shortcut key events to focused client */ - wlr_seat_keyboard_notify_key(wl_state.seat, - event->time_msec, event->keycode, event->state); + /* Forward non-shortcut key events to focused Wayland client (if any) */ + if (wl_state.seat->keyboard_state.focused_surface) + wlr_seat_keyboard_notify_key(wl_state.seat, + event->time_msec, event->keycode, event->state); } static void