mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 21:45:59 +01:00
compositor: don't block focus if there is no keyboard
This commit is contained in:
parent
f013acc6ee
commit
ff75f991a5
1 changed files with 10 additions and 13 deletions
|
@ -1032,11 +1032,7 @@ void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto KEYBOARD = wlr_seat_get_keyboard(m_sSeat.seat);
|
if (const auto KEYBOARD = wlr_seat_get_keyboard(m_sSeat.seat); KEYBOARD) {
|
||||||
|
|
||||||
if (!KEYBOARD)
|
|
||||||
return;
|
|
||||||
|
|
||||||
uint32_t keycodes[WLR_KEYBOARD_KEYS_CAP] = {0}; // TODO: maybe send valid, non-keybind codes?
|
uint32_t keycodes[WLR_KEYBOARD_KEYS_CAP] = {0}; // TODO: maybe send valid, non-keybind codes?
|
||||||
wlr_seat_keyboard_notify_enter(m_sSeat.seat, pSurface, keycodes, 0, &KEYBOARD->modifiers);
|
wlr_seat_keyboard_notify_enter(m_sSeat.seat, pSurface, keycodes, 0, &KEYBOARD->modifiers);
|
||||||
|
|
||||||
|
@ -1046,6 +1042,7 @@ void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) {
|
||||||
.new_surface = pSurface,
|
.new_surface = pSurface,
|
||||||
};
|
};
|
||||||
wl_signal_emit_mutable(&m_sSeat.seat->keyboard_state.events.focus_change, &event);
|
wl_signal_emit_mutable(&m_sSeat.seat->keyboard_state.events.focus_change, &event);
|
||||||
|
}
|
||||||
|
|
||||||
if (pWindowOwner)
|
if (pWindowOwner)
|
||||||
Debug::log(LOG, "Set keyboard focus to surface {:x}, with {}", (uintptr_t)pSurface, pWindowOwner);
|
Debug::log(LOG, "Set keyboard focus to surface {:x}, with {}", (uintptr_t)pSurface, pWindowOwner);
|
||||||
|
|
Loading…
Reference in a new issue