summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-04-02 19:09:27 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-04-02 19:09:27 +0200
commit7add082217b1e86f36bb152aec658eb5977622fa (patch)
treebf80981de454993f4b052588df2e7ec5cac7a77d /src/Compositor.cpp
parent223beb8a826773e2e3ea4c6d7e7d40fde9247d9a (diff)
send focus change
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 5fc00142..5f444fe8 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -388,6 +388,13 @@ void CCompositor::focusSurface(wlr_surface* pSurface, CWindow* pWindowOwner) {
wlr_seat_keyboard_notify_enter(m_sSeat.seat, pSurface, KEYBOARD->keycodes, KEYBOARD->num_keycodes, &KEYBOARD->modifiers);
+ wlr_seat_keyboard_focus_change_event event = {
+ .seat = m_sSeat.seat,
+ .old_surface = m_pLastFocus,
+ .new_surface = pSurface,
+ };
+ wlr_signal_emit_safe(&m_sSeat.seat->keyboard_state.events.focus_change, &event);
+
if (const auto PWINDOW = getWindowFromSurface(pSurface); PWINDOW)
Debug::log(LOG, "Set keyboard focus to surface %x, with window name: %s", pSurface, PWINDOW->m_szTitle.c_str());
else