diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-21 18:34:38 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-08-21 18:34:38 +0200 |
| commit | 8faac0c9aca3c3ce0ee80d6da946dadbeb15650d (patch) | |
| tree | 098e462e97e416cf91942adcb4e70c8831d4aee9 /src | |
| parent | c4ba11729f9bd62f2872de67699d6d355b6b5173 (diff) | |
minor activewindow and focus fixes
Diffstat (limited to 'src')
| -rw-r--r-- | src/Compositor.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 1d1fe033..214d9188 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -635,6 +635,8 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { wlr_seat_keyboard_notify_clear_focus(m_sSeat.seat); + g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", ","}); + m_pLastFocus = nullptr; return; } @@ -1546,13 +1548,6 @@ SLayerSurface* CCompositor::getLayerSurfaceFromWlr(wlr_layer_surface_v1* pLS) { void CCompositor::closeWindow(CWindow* pWindow) { if (pWindow && windowValidMapped(pWindow)) { g_pXWaylandManager->sendCloseWindow(pWindow); - - if (pWindow == m_pLastWindow) { - m_pLastFocus = nullptr; - m_pLastWindow = nullptr; - g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", ","}); // post an activewindow event to empty, as we are currently unfocused - focusWindow(windowFromCursor()); - } } } |
