aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main.c8
-rw-r--r--src/screen.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index f29ce67fd..c8b22df5f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -263,6 +263,11 @@ keyboard_event(mpd_unused GIOChannel *source,
g_source_remove(idle_source_id);
if ((cmd=get_keyboard_command()) != CMD_NONE) {
+ if (cmd == CMD_QUIT) {
+ g_main_loop_quit(main_loop);
+ return FALSE;
+ }
+
screen_cmd(mpd, cmd);
if (cmd == CMD_VOLUME_UP || cmd == CMD_VOLUME_DOWN) {
@@ -378,9 +383,6 @@ main(int argc, const char *argv[])
exit(EXIT_FAILURE);
}
- /* install exit function */
- atexit(exit_and_cleanup);
-
ncurses_init();
lyrics_init();
diff --git a/src/screen.c b/src/screen.c
index 479b1de5d..e0fa3e1c7 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -954,8 +954,6 @@ screen_cmd(mpdclient_t *c, command_t cmd)
case CMD_SCREEN_LYRICS:
switch_screen_mode(SCREEN_LYRICS_ID, c);
break;
- case CMD_QUIT:
- exit(EXIT_SUCCESS);
default:
break;
}