From d6aa6af5b3b3cc7c086423cb12c6f2bb76bd15c2 Mon Sep 17 00:00:00 2001 From: Maxim Andreev Date: Tue, 5 May 2026 19:31:09 +0400 Subject: groups: add groupbar middle_click_close option (#14242) --- src/render/decorations/CHyprGroupBarDecoration.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/render') 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("group:groupbar:stacked"); - static auto POUTERGAP = CConfigValue("group:groupbar:gaps_out"); - static auto PINNERGAP = CConfigValue("group:groupbar:gaps_in"); + static auto PSTACKED = CConfigValue("group:groupbar:stacked"); + static auto POUTERGAP = CConfigValue("group:groupbar:gaps_out"); + static auto PINNERGAP = CConfigValue("group:groupbar:gaps_in"); + static auto PMIDDLECLICKCLOSE = CConfigValue("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) -- cgit v1.2.3