summaryrefslogtreecommitdiff
path: root/src/key.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@gnugeneration.com>2017-02-22 09:57:52 -0800
committerGitHub <noreply@github.com>2017-02-22 09:57:52 -0800
commit01cdfeea061ab3339b4e5cbf0964005d4c15bd5e (patch)
treec6d74a8551ee344e22795bb577095ef3fb5f5eba /src/key.c
parent5b50e2a3affddb5693b91846b6c621590b8d21b2 (diff)
parent3d8f1432e555af373e7ccc3b6fffc80b70533888 (diff)
Trivial cleanup and small (but continuous) memory leak fix
Tidy up vwm exit handling and stop leaking an X Region on every clean vwm_composite_paint_all(). If you noticed very long-running vwm instances hogging memory like a web browser, this is the culprit, vwm doesn't typically need much memory.
Diffstat (limited to 'src/key.c')
-rw-r--r--src/key.c7
1 files changed, 2 insertions, 5 deletions
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 */
© All Rights Reserved