added button mask for pausing
This commit is contained in:
parent
451f56d591
commit
569272e96f
21
mpdart.c
21
mpdart.c
|
@ -449,17 +449,22 @@ int main(int argc, char** argv) {
|
||||||
break;
|
break;
|
||||||
/* toggle pause on press */
|
/* toggle pause on press */
|
||||||
case ButtonPress:
|
case ButtonPress:
|
||||||
DEBUG("Toggling pause\n");
|
|
||||||
|
|
||||||
mpd_run_noidle(connection);
|
if (ev.xbutton.button == Button1) {
|
||||||
mpd_check_error();
|
|
||||||
|
|
||||||
/* deprecated but they provide nothing better so fuck them */
|
DEBUG("Toggling pause\n");
|
||||||
mpd_run_toggle_pause(connection);
|
|
||||||
mpd_check_error();
|
|
||||||
|
|
||||||
mpd_send_idle_mask(connection, MPD_IDLE_PLAYER);
|
mpd_run_noidle(connection);
|
||||||
mpd_check_error();
|
mpd_check_error();
|
||||||
|
|
||||||
|
/* deprecated but they provide nothing better so fuck them */
|
||||||
|
mpd_run_toggle_pause(connection);
|
||||||
|
mpd_check_error();
|
||||||
|
|
||||||
|
mpd_send_idle_mask(connection, MPD_IDLE_PLAYER);
|
||||||
|
mpd_check_error();
|
||||||
|
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user