added ability to close window by right clicking
This commit is contained in:
parent
33d532d670
commit
6ed073347e
|
@ -38,7 +38,7 @@ These options can also be configured in the enviorment variables `MPDART_DIR`, `
|
|||
|
||||
To make these changes persistent, export them in your `~/.profile`.
|
||||
|
||||
Once mpdart is running you can press the window to toggle mpd's pause/play.
|
||||
Once mpdart is running you can left click the window to toggle mpd's pause/play or right click it to close it.
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
|
25
mpdart.c
25
mpdart.c
|
@ -450,19 +450,24 @@ int main(int argc, char** argv) {
|
|||
/* toggle pause on press */
|
||||
case ButtonPress:
|
||||
|
||||
if (ev.xbutton.button == Button1) {
|
||||
switch (ev.xbutton.button) {
|
||||
case Button1:
|
||||
DEBUG("Toggling pause\n");
|
||||
|
||||
DEBUG("Toggling pause\n");
|
||||
mpd_run_noidle(connection);
|
||||
mpd_check_error();
|
||||
|
||||
mpd_run_noidle(connection);
|
||||
mpd_check_error();
|
||||
/* deprecated but they provide nothing better so fuck them */
|
||||
mpd_run_toggle_pause(connection);
|
||||
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();
|
||||
mpd_send_idle_mask(connection, MPD_IDLE_PLAYER);
|
||||
mpd_check_error();
|
||||
break;
|
||||
case Button3:
|
||||
DEBUG("Exiting due to MB2 pree");
|
||||
exit(0);
|
||||
break;
|
||||
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue
Block a user