protocols: add xdg_toplevel_tag_v1 support
Adds a new windowrule to target windows by xdgTag, xdgtag:
This commit is contained in:
parent
55e953b383
commit
a4f7d7c594
11 changed files with 140 additions and 11 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -407,6 +407,8 @@ class CWindow {
|
|||
void setContentType(NContentType::eContentType contentType);
|
||||
void deactivateGroupMembers();
|
||||
bool isNotResponding();
|
||||
std::optional<std::string> xdgTag();
|
||||
std::optional<std::string> xdgDescription();
|
||||
|
||||
CBox getWindowMainSurfaceBox() const {
|
||||
return {m_vRealPosition->value().x, m_vRealPosition->value().y, m_vRealSize->value().x, m_vRealSize->value().y};
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class CWindowRule {
|
|||
RULE_WORKSPACE,
|
||||
RULE_PROP,
|
||||
RULE_CONTENT,
|
||||
RULE_PERSISTENTSIZE,
|
||||
RULE_PERSISTENTSIZE
|
||||
};
|
||||
|
||||
eRuleType ruleType = RULE_INVALID;
|
||||
|
|
@ -61,6 +61,7 @@ class CWindowRule {
|
|||
std::string szOnWorkspace = ""; // empty means any
|
||||
std::string szWorkspace = ""; // empty means any
|
||||
std::string szContentType = ""; // empty means any
|
||||
std::string szXdgTag = ""; // empty means any
|
||||
|
||||
// precompiled regexes
|
||||
CRuleRegexContainer rTitle;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue