diff options
author | Dickby <[email protected]> | 2023-09-19 12:37:30 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2023-09-19 11:37:30 +0100 |
commit | d8d0cd75c2db16a14086e1d5119ed937a60c701e (patch) | |
tree | 2ea8e137106045129102c3016ac7144529697346 | |
parent | c50072b108198a5c278c16967b700c713b0140a8 (diff) | |
download | Hyprland-d8d0cd75c2db16a14086e1d5119ed937a60c701e.tar.gz Hyprland-d8d0cd75c2db16a14086e1d5119ed937a60c701e.zip |
internal: Make part of CCompositor::focusWindow a bit easier to read. (#3356)
-rw-r--r-- | src/Compositor.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 749c9d27..18db8f16 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -917,13 +917,11 @@ 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 (!PLASTWINDOW && pWindow->m_sGroupData.pNextWindow) { + for (auto curr = pWindow->m_sGroupData.pNextWindow; curr != pWindow; 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) |