From e7b364d122d5bd6f709b4a38a678163be6ce3339 Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Wed, 15 Apr 2015 20:02:23 +0000 Subject: [PATCH] Add simple client killing --- sys-xcb.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/sys-xcb.c b/sys-xcb.c index 436a0e2..342fc48 100644 --- a/sys-xcb.c +++ b/sys-xcb.c @@ -746,16 +746,7 @@ void sys_show(win_t *win, state_t state) break; case ST_CLOSE: - // TODO - // if (!win_msg(win, WM_DELETE)) { - // XGrabServer(win->sys->dpy); - // XSetErrorHandler(xnoerror); - // XSetCloseDownMode(win->sys->dpy, DestroyAll); - // XKillClient(win->sys->dpy, win->sys->xid); - // XSync(win->sys->dpy, False); - // XSetErrorHandler(xerror); - // XUngrabServer(win->sys->dpy); - // } + xcb_kill_client(conn, xcb); break; } @@ -881,6 +872,9 @@ void sys_init(void) root = iter.data->root; colormap = iter.data->default_colormap; + /* Setup for for ST_CLOSE */ + xcb_set_close_down_mode(conn, XCB_CLOSE_DOWN_DESTROY_ALL); + /* Allocate key symbols */ if (!(keysyms = xcb_key_symbols_alloc(conn))) error("cannot allocate key symbols"); -- 2.43.2