Skip to content

Commit abae3a3

Browse files
AKArientrigg
authored andcommitted
panel : mixer : fix popup opening when doing mute_action
Instead of activating the control’s button, which was opening the widget popup, manually set the state and prevent poping up. Fixes #488 Co-authored by froloffw7
1 parent 62d891b commit abae3a3

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/panel/widgets/mixer/mixer.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,15 @@ void WayfireMixer::reload_config()
9898
return; // no quick_target means we have nothing to change by clicking
9999
}
100100

101-
quick_target->button.set_active(!quick_target->button.get_active());
101+
guint32 id = wp_proxy_get_bound_id(WP_PROXY(quick_target->object));
102+
bool mute = !quick_target->button.get_active();
103+
104+
// pretend the mixer control is the source of the change to prevent a popup
105+
objects_to_controls[quick_target->object]->ignore = true;
106+
// still set visual state
107+
objects_to_controls[quick_target->object]->set_btn_status_no_callbk(mute);
108+
quick_target->set_btn_status_no_callbk(mute);
109+
WpCommon::get().set_mute(id, mute);
102110
};
103111

104112
if (str_wp_left_click_action.value() == "show_mixer")

0 commit comments

Comments
 (0)