From 2f2bd34ace8b99b40a06fac76f47a85384a903aa Mon Sep 17 00:00:00 2001 From: David Hill Date: Wed, 11 Jul 2012 01:19:08 -0400 Subject: [PATCH] convert another XGetWindowAttributes to xcb --- spectrwm.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/spectrwm.c b/spectrwm.c index 7420e87..dc418de 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -7032,20 +7032,27 @@ maprequest(XEvent *e) { struct ws_win *win; struct swm_region *r; - XWindowAttributes wa; XMapRequestEvent *ev = &e->xmaprequest; + xcb_get_window_attributes_reply_t *war; DNPRINTF(SWM_D_EVENT, "maprequest: window: 0x%lx\n", e->xmaprequest.window); - if (!XGetWindowAttributes(display, ev->window, &wa)) + war = xcb_get_window_attributes_reply(conn, + xcb_get_window_attributes(conn, ev->window), + NULL); + if (!war) return; - if (wa.override_redirect) + if (war->override_redirect) { + free(war); return; + } + free(war); win = manage_window(e->xmaprequest.window); - if (win == NULL) + if (win == NULL) { return; /* can't happen */ + } stack(); -- 1.7.10.4