diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/config/values/ConfigValues.cpp | 1 | ||||
| -rw-r--r-- | src/render/decorations/CHyprGroupBarDecoration.cpp | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/config/values/ConfigValues.cpp b/src/config/values/ConfigValues.cpp index 0214ba86..2c44b172 100644 --- a/src/config/values/ConfigValues.cpp +++ b/src/config/values/ConfigValues.cpp @@ -412,6 +412,7 @@ std::vector<SP<IValue>> Values::getConfigValues() { MS<Int>("group:groupbar:priority", "sets the decoration priority for groupbars", 3, {.min = 0, .max = 6}), MS<Bool>("group:groupbar:render_titles", "whether to render titles in the group bar decoration", true), MS<Bool>("group:groupbar:scrolling", "whether scrolling in the groupbar changes group active window", true), + MS<Bool>("group:groupbar:middle_click_close", "whether middle clicking the groupbar closes the clicked window", true), MS<Int>("group:groupbar:rounding", "how much to round the groupbar", 1, {.min = 0, .max = 20}), MS<Float>("group:groupbar:rounding_power", "rounding power of groupbar corners (2 is a circle)", 2, {.min = 2, .max = 10}), MS<Int>("group:groupbar:gradient_rounding", "how much to round the groupbar gradient", 2, {.min = 0, .max = 20}), diff --git a/src/render/decorations/CHyprGroupBarDecoration.cpp b/src/render/decorations/CHyprGroupBarDecoration.cpp index fa4b157e..50b89545 100644 --- a/src/render/decorations/CHyprGroupBarDecoration.cpp +++ b/src/render/decorations/CHyprGroupBarDecoration.cpp @@ -431,9 +431,10 @@ bool CHyprGroupBarDecoration::onEndWindowDragOnDeco(const Vector2D& pos, PHLWIND } bool CHyprGroupBarDecoration::onMouseButtonOnDeco(const Vector2D& pos, const IPointer::SButtonEvent& e) { - static auto PSTACKED = CConfigValue<Config::INTEGER>("group:groupbar:stacked"); - static auto POUTERGAP = CConfigValue<Config::INTEGER>("group:groupbar:gaps_out"); - static auto PINNERGAP = CConfigValue<Config::INTEGER>("group:groupbar:gaps_in"); + static auto PSTACKED = CConfigValue<Config::INTEGER>("group:groupbar:stacked"); + static auto POUTERGAP = CConfigValue<Config::INTEGER>("group:groupbar:gaps_out"); + static auto PINNERGAP = CConfigValue<Config::INTEGER>("group:groupbar:gaps_in"); + static auto PMIDDLECLICKCLOSE = CConfigValue<Config::INTEGER>("group:groupbar:middle_click_close"); if (m_window->isEffectiveInternalFSMode(FSMODE_FULLSCREEN)) return true; @@ -444,6 +445,9 @@ bool CHyprGroupBarDecoration::onMouseButtonOnDeco(const Vector2D& pos, const IPo // close window on middle click if (e.button == 274) { + if (!*PMIDDLECLICKCLOSE) + return true; + static Vector2D pressedCursorPos; if (e.state == WL_POINTER_BUTTON_STATE_PRESSED) |
