summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index ec70bb68..f2fcceff 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -924,6 +924,16 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
g_pLayoutManager->getCurrentLayout()->onWindowFocusChange(pWindow);
+ // TODO: implement this better
+ if (!PLASTWINDOW && pWindow->m_sGroupData.pNextWindow && pWindow->m_sGroupData.pNextWindow != pWindow) {
+ auto curr = pWindow;
+ do {
+ curr = curr->m_sGroupData.pNextWindow;
+ if (curr->m_phForeignToplevel)
+ wlr_foreign_toplevel_handle_v1_set_activated(curr->m_phForeignToplevel, false);
+ } while (curr->m_sGroupData.pNextWindow != pWindow);
+ }
+
if (pWindow->m_phForeignToplevel)
wlr_foreign_toplevel_handle_v1_set_activated(pWindow->m_phForeignToplevel, true);