diff options
| author | Maxim Andreev <andreevmaxim@gmail.com> | 2026-05-05 19:31:09 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-05 16:31:09 +0100 |
| commit | d6aa6af5b3b3cc7c086423cb12c6f2bb76bd15c2 (patch) | |
| tree | 71500ba1cacf2c3ee4500071a08b9452fcf1aada /src/render | |
| parent | 497b48e8520e4beac16a1a209551c3db46a6d917 (diff) | |
groups: add groupbar middle_click_close option (#14242)
Diffstat (limited to 'src/render')
| -rw-r--r-- | src/render/decorations/CHyprGroupBarDecoration.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
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) |
