diff options
| author | vaxerski <vaxry@vaxry.net> | 2022-08-08 20:21:11 +0200 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2022-08-08 20:21:11 +0200 |
| commit | bf9d358d3b73416ac76812038534863a9e245d85 (patch) | |
| tree | 9174194184930cead5fa7217ae5e1267099d145c /src | |
| parent | 9532ff42871615d3293f5fb679282e3423ff380d (diff) | |
fix refocus shenanigans with window data
Diffstat (limited to 'src')
| -rw-r--r-- | src/Compositor.cpp | 10 | ||||
| -rw-r--r-- | src/managers/input/InputManager.cpp | 4 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 844b43be..aa5b3e29 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -615,7 +615,17 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { } if (!pWindow || !windowValidMapped(pWindow)) { + if (windowValidMapped(m_pLastWindow)) { + updateWindowAnimatedDecorationValues(m_pLastWindow); + + if (m_pLastWindow->m_phForeignToplevel) + wlr_foreign_toplevel_handle_v1_set_activated(m_pLastWindow->m_phForeignToplevel, false); + } + wlr_seat_keyboard_notify_clear_focus(m_sSeat.seat); + + m_pLastWindow = nullptr; + m_pLastFocus = nullptr; return; } diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index ed7623d6..e23962a1 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -210,9 +210,7 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) { wlr_seat_pointer_clear_focus(g_pCompositor->m_sSeat.seat); if (refocus) { // if we are forcing a refocus, and we don't find a surface, clear the kb focus too! - g_pCompositor->focusSurface(nullptr); - - g_pCompositor->m_pLastWindow = nullptr; + g_pCompositor->focusWindow(nullptr); } return; |
