Skip to content

Commit

Permalink
internal: Make part of CCompositor::focusWindow a bit easier to read. (
Browse files Browse the repository at this point in the history
  • Loading branch information
Dickby authored Sep 19, 2023
1 parent c50072b commit d8d0cd7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Compositor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d8d0cd7

Please sign in to comment.