diff options
| author | Vaxry <vaxry@vaxry.net> | 2023-11-05 16:22:43 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2023-11-05 16:22:43 +0000 |
| commit | 600a128f83c9f6d6cf37d4e9de6bf9001d321bd0 (patch) | |
| tree | 1d52f80328c5fc0d55ee99dd7ce7acf562c2cf98 /src/Compositor.cpp | |
| parent | 55825c301e5f437566e042d7036bc29a2e48257b (diff) | |
compositor: allow windowfromregex tiled param
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index fc45496e..30e9fdb6 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -2350,13 +2350,15 @@ CWindow* CCompositor::getWindowByRegex(const std::string& regexp) { } else if (regexp.starts_with("pid:")) { mode = MODE_PID; matchCheck = regexp.substr(4); - } else if (regexp.starts_with("floating")) { + } else if (regexp.starts_with("floating") || regexp.starts_with("tiled")) { // first floating on the current ws if (!m_pLastWindow) return nullptr; + const bool FLOAT = regexp.starts_with("floating"); + for (auto& w : m_vWindows) { - if (!w->m_bIsMapped || !w->m_bIsFloating || w->m_iWorkspaceID != m_pLastWindow->m_iWorkspaceID || w->isHidden()) + if (!w->m_bIsMapped || w->m_bIsFloating != FLOAT || w->m_iWorkspaceID != m_pLastWindow->m_iWorkspaceID || w->isHidden()) continue; return w.get(); |
