diff options
| author | Vaxry <vaxry@vaxry.net> | 2025-04-21 22:22:06 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2025-04-21 22:30:27 +0100 |
| commit | a4f7d7c594c70408f299ec8b794211c534709eaa (patch) | |
| tree | 1365c77e4789f054550876a1720b2aa890271f04 /src/desktop/Window.cpp | |
| parent | 55e953b383f6b658b20ede1fea7772d2a88e7c65 (diff) | |
protocols: add xdg_toplevel_tag_v1 support
Adds a new windowrule to target windows by xdgTag, xdgtag:
Diffstat (limited to 'src/desktop/Window.cpp')
| -rw-r--r-- | src/desktop/Window.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp index ffe49498..e2131133 100644 --- a/src/desktop/Window.cpp +++ b/src/desktop/Window.cpp @@ -1808,3 +1808,17 @@ void CWindow::deactivateGroupMembers() { bool CWindow::isNotResponding() { return g_pANRManager->isNotResponding(m_pSelf.lock()); } + +std::optional<std::string> CWindow::xdgTag() { + if (!m_pXDGSurface || !m_pXDGSurface->toplevel) + return std::nullopt; + + return m_pXDGSurface->toplevel->m_toplevelTag; +} + +std::optional<std::string> CWindow::xdgDescription() { + if (!m_pXDGSurface || !m_pXDGSurface->toplevel) + return std::nullopt; + + return m_pXDGSurface->toplevel->m_toplevelDescription; +} |
