diff options
author | MightyPlaza <[email protected]> | 2024-06-11 20:56:35 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2024-06-11 22:56:35 +0200 |
commit | b6bf4afb4861c7a7b41c6bf53daadf57a708e352 (patch) | |
tree | 4092fdd8efd14190ee49fba2dac406e54e483df6 /src/Compositor.cpp | |
parent | e1b05f8eafd8cd3e7e9197fa1db92391174b9206 (diff) | |
download | Hyprland-b6bf4afb4861c7a7b41c6bf53daadf57a708e352.tar.gz Hyprland-b6bf4afb4861c7a7b41c6bf53daadf57a708e352.zip |
layer: don't close special ws when restoring focus (#6424)
modified: src/Compositor.cpp
modified: src/Compositor.hpp
modified: src/managers/input/InputManager.cpp
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r-- | src/Compositor.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 8b19f010..7d33889e 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1111,6 +1111,17 @@ bool CCompositor::isWorkspaceVisible(PHLWORKSPACE w) { return valid(w) && w->m_bVisible; } +bool CCompositor::isWorkspaceVisibleNotCovered(PHLWORKSPACE w) { + if (!valid(w)) + return false; + + const auto PMONITOR = getMonitorFromID(w->m_iMonitorID); + if (PMONITOR->activeSpecialWorkspace) + return PMONITOR->activeSpecialWorkspace->m_iID == w->m_iID; + + return PMONITOR->activeWorkspace->m_iID == w->m_iID; +} + PHLWORKSPACE CCompositor::getWorkspaceByID(const int& id) { for (auto& w : m_vWorkspaces) { if (w->m_iID == id && !w->inert()) |