summaryrefslogtreecommitdiff
path: root/audio/herrie/patches/herrie-2.1-signals.diff
diff options
context:
space:
mode:
Diffstat (limited to 'audio/herrie/patches/herrie-2.1-signals.diff')
-rw-r--r--audio/herrie/patches/herrie-2.1-signals.diff67
1 files changed, 67 insertions, 0 deletions
diff --git a/audio/herrie/patches/herrie-2.1-signals.diff b/audio/herrie/patches/herrie-2.1-signals.diff
new file mode 100644
index 0000000000..b1a39bea1d
--- /dev/null
+++ b/audio/herrie/patches/herrie-2.1-signals.diff
@@ -0,0 +1,67 @@
+diff -ru herrie-2.1-orig/herrie-2.1/src/gui_input.c herrie-2.1-signals/herrie-2.1/src/gui_input.c
+--- herrie-2.1-orig/herrie-2.1/src/gui_input.c 2008-07-15 10:59:07.000000000 -0500
++++ herrie-2.1-signals/herrie-2.1/src/gui_input.c 2008-07-18 09:44:41.000000000 -0500
+@@ -521,6 +521,9 @@
+ sigset_t sset;
+
+ sigemptyset(&sset);
++ sigaddset(&sset, SIGRTMIN+1);
++ sigaddset(&sset, SIGRTMIN+2);
++ sigaddset(&sset, SIGRTMIN+3);
+ sigaddset(&sset, SIGUSR1);
+ sigaddset(&sset, SIGUSR2);
+ sigaddset(&sset, SIGHUP);
+@@ -545,20 +548,29 @@
+ if (shutting_down)
+ return;
+
+- switch (signal) {
+- case SIGUSR1:
+- playq_cursong_pause();
+- break;
+- case SIGUSR2:
+- playq_cursong_next();
+- break;
+- case SIGHUP:
+- case SIGINT:
+- case SIGPIPE:
+- case SIGQUIT:
+- case SIGTERM:
+- gui_input_quit();
+- g_assert_not_reached();
++ if (signal == (SIGRTMIN+1)) { gui_playq_song_select(); }
++ else {
++ if (signal == (SIGRTMIN+2)) { playq_cursong_stop(); }
++ else {
++ if (signal == (SIGRTMIN+3)) { playq_cursong_prev(); }
++ else {
++ switch (signal) {
++ case SIGUSR1:
++ playq_cursong_pause();
++ break;
++ case SIGUSR2:
++ playq_cursong_next();
++ break;
++ case SIGHUP:
++ case SIGINT:
++ case SIGPIPE:
++ case SIGQUIT:
++ case SIGTERM:
++ gui_input_quit();
++ g_assert_not_reached();
++ }
++ }
++ }
+ }
+ }
+ #endif /* G_OS_UNIX */
+@@ -570,6 +582,9 @@
+ unsigned int i;
+
+ #ifdef G_OS_UNIX
++ signal(SIGRTMIN+1, gui_input_sighandler);
++ signal(SIGRTMIN+2, gui_input_sighandler);
++ signal(SIGRTMIN+3, gui_input_sighandler);
+ signal(SIGUSR1, gui_input_sighandler);
+ signal(SIGUSR2, gui_input_sighandler);
+ signal(SIGHUP, gui_input_sighandler);