fix(pulse): Use distinct event names

volup, voldow, volmute, are caught by the alsa module, if there is an
alsa module on the bar.
This commit is contained in:
patrick96 2018-03-27 09:52:31 +02:00 committed by NBonaparte
parent d007539a6b
commit 3ea60ace91
2 changed files with 5 additions and 5 deletions

View File

@ -35,10 +35,10 @@ namespace modules {
static constexpr auto TAG_LABEL_VOLUME = "<label-volume>";
static constexpr auto TAG_LABEL_MUTED = "<label-muted>";
static constexpr auto EVENT_PREFIX = "vol";
static constexpr auto EVENT_VOLUME_UP = "volup";
static constexpr auto EVENT_VOLUME_DOWN = "voldown";
static constexpr auto EVENT_TOGGLE_MUTE = "volmute";
static constexpr auto EVENT_PREFIX = "pa_vol";
static constexpr auto EVENT_VOLUME_UP = "pa_volup";
static constexpr auto EVENT_VOLUME_DOWN = "pa_voldown";
static constexpr auto EVENT_TOGGLE_MUTE = "pa_volmute";
progressbar_t m_bar_volume;
ramp_t m_ramp_volume;

View File

@ -126,7 +126,7 @@ namespace modules {
bool pulseaudio_module::input(string&& cmd) {
if (!m_handle_events) {
return false;
} else if (cmd.compare(0, 3, EVENT_PREFIX) != 0) {
} else if (cmd.compare(0, strlen(EVENT_PREFIX), EVENT_PREFIX) != 0) {
return false;
}