From b3f747ce9668befedc5399fb8f4623e66d6163e2 Mon Sep 17 00:00:00 2001 From: David Hill Date: Fri, 6 Jul 2012 02:17:09 -0400 Subject: [PATCH] Revert "convert a XGetWindowAttributes" This reverts commit 4f87451a3ee933bae873789020054ba95d9626f4. It is not doing what it is supposed to do :) --- spectrwm.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/spectrwm.c b/spectrwm.c index 3367c2a..d63e6e8 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -3223,6 +3223,7 @@ adjust_font(struct ws_win *win) void stack_master(struct workspace *ws, struct swm_geometry *g, int rot, int flip) { + XWindowAttributes wa; struct swm_geometry win_g, r_g = *g; struct ws_win *win, *fs_win = NULL; int i, j, s, stacks; @@ -3231,8 +3232,6 @@ stack_master(struct workspace *ws, struct swm_geometry *g, int rot, int flip) int split, colno, winno, mwin, msize, mscale; int remain, missing, v_slice, reconfigure; int bordered = 1; - xcb_get_window_attributes_cookie_t wac; - xcb_get_window_attributes_reply_t *war; DNPRINTF(SWM_D_STACK, "stack_master: workspace: %d, rot: %s, " "flip: %s\n", ws->idx, YESNO(rot), YESNO(flip)); @@ -3395,13 +3394,10 @@ stack_master(struct workspace *ws, struct swm_geometry *g, int rot, int flip) update_window(win); } - wac = xcb_get_window_attributes(conn, win->id); - war = xcb_get_window_attributes_reply(conn, wac, NULL); - if (war) { - if (war->map_state == XCB_MAP_STATE_UNMAPPED) + if (XGetWindowAttributes(display, win->id, &wa)) + if (wa.map_state == IsUnmapped) map_window_raised(win->id); - free(war); - } + last_h = win_g.h; i++; j++; -- 1.7.10.4