From c04563734e0482bd10045c70d9d85177e5448143 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 24 Oct 2022 12:25:36 +0100 Subject: Rework candidate finding on close window --- src/Compositor.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Compositor.cpp') diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 8e3ec390..8441e1bc 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -723,6 +723,8 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", ","}); + g_pLayoutManager->getCurrentLayout()->onWindowFocusChange(nullptr); + m_pLastFocus = nullptr; return; } @@ -774,6 +776,8 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) { // Send an event g_pEventManager->postEvent(SHyprIPCEvent{"activewindow", g_pXWaylandManager->getAppIDClass(pWindow) + "," + pWindow->m_szTitle}); + g_pLayoutManager->getCurrentLayout()->onWindowFocusChange(pWindow); + if (pWindow->m_phForeignToplevel) wlr_foreign_toplevel_handle_v1_set_activated(pWindow->m_phForeignToplevel, true); } -- cgit v1.2.3