From b0b0dcf525eee37f52694bb27d7b6b54f9af7935 Mon Sep 17 00:00:00 2001 From: Arnaud Fontaine Date: Fri, 28 Mar 2008 13:48:05 +0000 Subject: [PATCH] [client] Send properly the ClientMessage request when killing a client --- client.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client.c b/client.c index fbbf6a2f..5ac76806 100644 --- a/client.c +++ b/client.c @@ -960,8 +960,13 @@ client_kill(Client *c) if(client_isprotodel(globalconf.connection, c->win)) { + /* Initialize all of event's fields first */ + memset(&ev, 0, sizeof(ev)); + + ev.response_type = XCB_CLIENT_MESSAGE; ev.window = c->win; ev.type = xutil_intern_atom(globalconf.connection, "WM_PROTOCOLS"); + ev.format = 32; ev.data.data32[0] = xutil_intern_atom(globalconf.connection, "WM_DELETE_WINDOW"); ev.data.data32[1] = XCB_CURRENT_TIME;