mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-08 16:11:57 -07:00
layout: Allow the layout to control how windows are raised in groups (#3275)
* Allow the layout to control how windows are raised in groups Previously windows could only be focused if they weren't hidden or were part of a group. This shifts the logic for picking the window out of a group to the layout allowing for alternate group implementations to function normally. * Fix doc comment consistency * Fix tabs in comments
This commit is contained in:
@@ -829,10 +829,7 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pWindow && pWindow->isHidden() && pWindow->m_sGroupData.pNextWindow) {
|
||||
// grouped, change the current to us
|
||||
pWindow->setGroupCurrent(pWindow);
|
||||
}
|
||||
g_pLayoutManager->getCurrentLayout()->bringWindowToTop(pWindow);
|
||||
|
||||
if (!pWindow || !windowValidMapped(pWindow)) {
|
||||
const auto PLASTWINDOW = m_pLastWindow;
|
||||
@@ -2171,7 +2168,7 @@ CWindow* CCompositor::getWindowByRegex(const std::string& regexp) {
|
||||
}
|
||||
|
||||
for (auto& w : g_pCompositor->m_vWindows) {
|
||||
if (!w->m_bIsMapped || (w->isHidden() && !w->m_sGroupData.pNextWindow))
|
||||
if (!w->m_bIsMapped || (w->isHidden() && !g_pLayoutManager->getCurrentLayout()->isWindowReachable(w.get())))
|
||||
continue;
|
||||
|
||||
switch (mode) {
|
||||
|
Reference in New Issue
Block a user