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
|
||||
------------
|
||||
|
|
9
mpdart.c
9
mpdart.c
|
@ -450,8 +450,8 @@ 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");
|
||||
|
||||
mpd_run_noidle(connection);
|
||||
|
@ -463,6 +463,11 @@ int main(int argc, char** argv) {
|
|||
|
||||
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