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:
2594aa6
)
convert bar_refresh() to XCB
author
David Hill
<dhill@conformal.com>
Wed, 4 Jul 2012 06:14:18 +0000
(
02:14
-0400)
committer
Reginald Kennedy
<rk@rejii.com>
Fri, 20 Jul 2012 21:58:30 +0000
(
05:58
+0800)
spectrwm.c
patch
|
blob
|
history
diff --git
a/spectrwm.c
b/spectrwm.c
index
20adaa4
..
5ea7095
100644
(file)
--- a/
spectrwm.c
+++ b/
spectrwm.c
@@
-1822,8
+1822,8
@@
bar_toggle(struct swm_region *r, union arg *args)
void
bar_refresh(void)
{
void
bar_refresh(void)
{
- XSetWindowAttributes wa;
struct swm_region *r;
struct swm_region *r;
+ uint32_t wa[2];
int i, num_screens;
/* do this here because the conf file is in memory */
int i, num_screens;
/* do this here because the conf file is in memory */
@@
-1855,18
+1855,15
@@
bar_refresh(void)
}
}
}
}
- bzero(&wa, sizeof wa);
num_screens = xcb_setup_roots_length(xcb_get_setup(conn));
for (i = 0; i < num_screens; i++)
TAILQ_FOREACH(r, &screens[i].rl, entry) {
if (r->bar == NULL)
continue;
num_screens = xcb_setup_roots_length(xcb_get_setup(conn));
for (i = 0; i < num_screens; i++)
TAILQ_FOREACH(r, &screens[i].rl, entry) {
if (r->bar == NULL)
continue;
- wa.border_pixel =
- screens[i].c[SWM_S_COLOR_BAR_BORDER].color;
- wa.background_pixel =
- screens[i].c[SWM_S_COLOR_BAR].color;
- XChangeWindowAttributes(display, r->bar->id,
- CWBackPixel | CWBorderPixel, &wa);
+ wa[0] = screens[i].c[SWM_S_COLOR_BAR].color;
+ wa[1] = screens[i].c[SWM_S_COLOR_BAR_BORDER].color;
+ xcb_change_window_attributes(conn, r->bar->id,
+ XCB_CW_BACK_PIXEL | XCB_CW_BORDER_PIXEL, wa);
}
bar_update();
}
}
bar_update();
}