fix(hyprland/workspaces): respect enable-bar-scroll config option
Removed hasScrollConfig boolean variable in Workspaces init function. It was Or'd with barScroll boolean variable and overriding it when enable-bar-scroll is declared false in waybar config. Setting any scroll up or down events caused enable-bar-scroll to be overwritten. Tested on Arch/Hyprland, removing hasScrollConfig and the or condition restored expected behavior. Fixes #5229
This commit is contained in:
@@ -55,8 +55,8 @@ void Workspaces::init() {
|
|||||||
if (m_scrollEventConnection_.connected()) {
|
if (m_scrollEventConnection_.connected()) {
|
||||||
m_scrollEventConnection_.disconnect();
|
m_scrollEventConnection_.disconnect();
|
||||||
}
|
}
|
||||||
bool hasScrollConfig = config_["on-scroll-up"].isString() || config_["on-scroll-down"].isString();
|
|
||||||
if (barScroll() || hasScrollConfig) {
|
if (barScroll()) {
|
||||||
auto& window = const_cast<Bar&>(m_bar).window;
|
auto& window = const_cast<Bar&>(m_bar).window;
|
||||||
window.add_events(Gdk::SCROLL_MASK | Gdk::SMOOTH_SCROLL_MASK);
|
window.add_events(Gdk::SCROLL_MASK | Gdk::SMOOTH_SCROLL_MASK);
|
||||||
m_scrollEventConnection_ =
|
m_scrollEventConnection_ =
|
||||||
|
|||||||
Reference in New Issue
Block a user