summaryrefslogtreecommitdiff
path: root/src/config/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/config/shared')
-rw-r--r--src/config/shared/actions/ConfigActions.cpp13
-rw-r--r--src/config/shared/actions/ConfigActions.hpp1
2 files changed, 14 insertions, 0 deletions
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<PHLWINDOW> w)
return {};
}
+ActionResult Actions::clearTags(std::optional<PHLWINDOW> 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<PHLWINDOW> w) {
auto window = xtract(w);
if (!window)
diff --git a/src/config/shared/actions/ConfigActions.hpp b/src/config/shared/actions/ConfigActions.hpp
index 0f16aff7..6ddf64d9 100644
--- a/src/config/shared/actions/ConfigActions.hpp
+++ b/src/config/shared/actions/ConfigActions.hpp
@@ -53,6 +53,7 @@ namespace Config::Actions {
ActionResult move(const Vector2D& pos, bool relative = false, std::optional<PHLWINDOW> window = std::nullopt /* Active */);
ActionResult cycleNext(const bool next, std::optional<bool> onlyTiled, std::optional<bool> onlyFloating, std::optional<PHLWINDOW> window = std::nullopt /* Active */);
ActionResult tag(const std::string& tag, std::optional<PHLWINDOW> window = std::nullopt /* Active */);
+ ActionResult clearTags(std::optional<PHLWINDOW> w = std::nullopt);
ActionResult pass(std::optional<PHLWINDOW> window = std::nullopt /* Active */);
ActionResult pass(uint32_t modMask, uint32_t key, std::optional<PHLWINDOW> window = std::nullopt /* Active */);
ActionResult sendKeyState(uint32_t modMask, uint32_t key, uint32_t state, std::optional<PHLWINDOW> window = std::nullopt /* Active */);