From 04d82b8968b6f5eea263dd6ab8302fff059cad9e Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Wed, 22 Feb 2017 09:20:28 -0800 Subject: vwm: use vwm.done to signal quit This moves the console teardown back to vwm.c, trivial cleanup. --- src/key.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/key.c') diff --git a/src/key.c b/src/key.c index 47a2c8d..8827e15 100644 --- a/src/key.c +++ b/src/key.c @@ -97,7 +97,6 @@ void vwm_key_pressed(vwm_t *vwm, Window win, XKeyPressedEvent *keypress) static typeof(keypress->state) last_state; static int repeat_cnt = 0; int do_grab = 0; - char *quit_console_args[] = {"/bin/sh", "-c", "screen -dr " CONSOLE_SESSION_STRING " -X quit", NULL}; sym = XLookupKeysym(keypress, 0); @@ -174,10 +173,8 @@ void vwm_key_pressed(vwm_t *vwm, Window win, XKeyPressedEvent *keypress) case XK_Escape: /* leave VWM rudely, after triple press */ do_grab = 1; - if (repeat_cnt == 2) { - vwm_launch(vwm, quit_console_args, VWM_LAUNCH_MODE_FG); - exit(42); - } + if (repeat_cnt == 2) + vwm->done = 1; break; case XK_v: /* instantiate (and focus) a new (potentially empty, unless migrating) virtual desktop */ -- cgit v1.2.3