Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
spectrwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
55953d5
)
convert a XGetWindowAttributes to XCB
author
David Hill
<dhill@conformal.com>
Fri, 13 Jul 2012 01:24:07 +0000
(21:24 -0400)
committer
Reginald Kennedy
<rk@rejii.com>
Fri, 20 Jul 2012 21:58:33 +0000
(
05:58
+0800)
spectrwm.c
patch
|
blob
|
history
diff --git
a/spectrwm.c
b/spectrwm.c
index
6942be9
..
a9aa77c
100644
(file)
--- a/
spectrwm.c
+++ b/
spectrwm.c
@@
-3305,7
+3305,6
@@
adjust_font(struct ws_win *win)
void
stack_master(struct workspace *ws, struct swm_geometry *g, int rot, int flip)
{
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;
struct swm_geometry win_g, r_g = *g;
struct ws_win *win, *fs_win = NULL;
int i, j, s, stacks;
@@
-3314,6
+3313,7
@@
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;
int split, colno, winno, mwin, msize, mscale;
int remain, missing, v_slice, reconfigure;
int bordered = 1;
+ 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));
DNPRINTF(SWM_D_STACK, "stack_master: workspace: %d, rot: %s, "
"flip: %s\n", ws->idx, YESNO(rot), YESNO(flip));
@@
-3476,9
+3476,14
@@
stack_master(struct workspace *ws, struct swm_geometry *g, int rot, int flip)
update_window(win);
}
update_window(win);
}
- if (XGetWindowAttributes(display, win->id, &wa))
- if (wa.map_state == IsUnmapped)
+ war = xcb_get_window_attributes_reply(conn,
+ xcb_get_window_attributes(conn, win->id),
+ NULL);
+ if (war) {
+ if (war->map_state == XCB_MAP_STATE_UNMAPPED)
map_window_raised(win->id);
map_window_raised(win->id);
+ free(war);
+ }
last_h = win_g.h;
i++;
last_h = win_g.h;
i++;