diff --git a/src/group.cpp b/src/group.cpp index 20c05a82..5a81c254 100644 --- a/src/group.cpp +++ b/src/group.cpp @@ -67,7 +67,11 @@ Group::Group(const std::string& name, const std::string& id, const Json::Value& const bool left_to_right = (drawer_config["transition-left-to-right"].isBool() ? drawer_config["transition-left-to-right"].asBool() : true); - click_to_reveal = drawer_config["click-to-reveal"].asBool() || toggle_signal.has_value(); + click_to_reveal = drawer_config["click-to-reveal"].asBool(); + if (click_to_reveal && toggle_signal) { + throw std::runtime_error( + R"(A group cannot have both "click-to-reveal" and "toggle-signal".)"); + } auto transition_type = getPreferredTransitionType(vertical); @@ -108,14 +112,14 @@ void Group::hide_group() { } bool Group::handleMouseEnter(GdkEventCrossing* const& e) { - if (!click_to_reveal) { + if (!click_to_reveal && !toggle_signal) { show_group(); } return false; } bool Group::handleMouseLeave(GdkEventCrossing* const& e) { - if (!click_to_reveal && e->detail != GDK_NOTIFY_INFERIOR) { + if (!click_to_reveal && e->detail != GDK_NOTIFY_INFERIOR && !toggle_signal) { hide_group(); } return false;