From 6a7abd00379b4f37b468bc2d0e717d4ba293efe1 Mon Sep 17 00:00:00 2001 From: Lichie <90825386+lichie567@users.noreply.github.com> Date: Sun, 3 May 2026 10:55:47 -0700 Subject: config/lua: add clear tag api (#14273) --- src/config/shared/actions/ConfigActions.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/config/shared/actions/ConfigActions.cpp') diff --git a/src/config/shared/actions/ConfigActions.cpp b/src/config/shared/actions/ConfigActions.cpp index 5db1aaf1..7111afd8 100644 --- a/src/config/shared/actions/ConfigActions.cpp +++ b/src/config/shared/actions/ConfigActions.cpp @@ -605,6 +605,19 @@ ActionResult Actions::tag(const std::string& tagStr, std::optional w) return {}; } +ActionResult Actions::clearTags(std::optional w) { + auto window = xtract(w); + if (!window) + return {}; + + if (window->m_ruleApplicator->m_tagKeeper.clearTags()) { + window->m_ruleApplicator->propertiesChanged(Desktop::Rule::RULE_PROP_TAG); + window->updateDecorationValues(); + } + + return {}; +} + ActionResult Actions::swapNext(const bool next, std::optional w) { auto window = xtract(w); if (!window) -- cgit v1.2.3