From a4f7d7c594c70408f299ec8b794211c534709eaa Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 21 Apr 2025 22:22:06 +0100 Subject: protocols: add xdg_toplevel_tag_v1 support Adds a new windowrule to target windows by xdgTag, xdgtag: --- src/desktop/Window.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/desktop/Window.cpp') 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 CWindow::xdgTag() { + if (!m_pXDGSurface || !m_pXDGSurface->toplevel) + return std::nullopt; + + return m_pXDGSurface->toplevel->m_toplevelTag; +} + +std::optional CWindow::xdgDescription() { + if (!m_pXDGSurface || !m_pXDGSurface->toplevel) + return std::nullopt; + + return m_pXDGSurface->toplevel->m_toplevelDescription; +} -- cgit v1.2.3