Fix group signal-triggered group closing incorrectly
Some checks failed
clang-format / lint (push) Has been cancelled
freebsd / build (push) Has been cancelled
linux / build (c++20, alpine) (push) Has been cancelled
linux / build (c++20, archlinux) (push) Has been cancelled
linux / build (c++20, debian) (push) Has been cancelled
linux / build (c++20, fedora) (push) Has been cancelled
linux / build (c++20, gentoo) (push) Has been cancelled
linux / build (c++20, opensuse) (push) Has been cancelled
Nix-Tests / nix-flake-check (push) Has been cancelled
Some checks failed
clang-format / lint (push) Has been cancelled
freebsd / build (push) Has been cancelled
linux / build (c++20, alpine) (push) Has been cancelled
linux / build (c++20, archlinux) (push) Has been cancelled
linux / build (c++20, debian) (push) Has been cancelled
linux / build (c++20, fedora) (push) Has been cancelled
linux / build (c++20, gentoo) (push) Has been cancelled
linux / build (c++20, opensuse) (push) Has been cancelled
Nix-Tests / nix-flake-check (push) Has been cancelled
This commit is contained in:
@ -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()
|
const bool left_to_right = (drawer_config["transition-left-to-right"].isBool()
|
||||||
? drawer_config["transition-left-to-right"].asBool()
|
? drawer_config["transition-left-to-right"].asBool()
|
||||||
: true);
|
: 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);
|
auto transition_type = getPreferredTransitionType(vertical);
|
||||||
|
|
||||||
@ -108,14 +112,14 @@ void Group::hide_group() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Group::handleMouseEnter(GdkEventCrossing* const& e) {
|
bool Group::handleMouseEnter(GdkEventCrossing* const& e) {
|
||||||
if (!click_to_reveal) {
|
if (!click_to_reveal && !toggle_signal) {
|
||||||
show_group();
|
show_group();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Group::handleMouseLeave(GdkEventCrossing* const& e) {
|
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();
|
hide_group();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user