Use the new defaults from globalconf

This makes all the code use the default colormap, depth and visual from
globalconf.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2010-09-30 12:55:58 +02:00
parent eef3fdb452
commit dfd95f1f72
4 changed files with 10 additions and 10 deletions

View file

@ -134,7 +134,7 @@ xcolor_init_unchecked(xcolor_t *color, const char *colstr, ssize_t len)
req.alpha = RGB_8TO16(alpha);
req.cookie_hexa = xcb_alloc_color_unchecked(globalconf.connection,
globalconf.screen->default_colormap,
globalconf.default_cmap,
RGB_8TO16(red),
RGB_8TO16(green),
RGB_8TO16(blue));

View file

@ -428,9 +428,9 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, bool startup)
/* Store window */
c->window = w;
c->frame_window = xcb_generate_id(globalconf.connection);
xcb_create_window(globalconf.connection, s->root_depth, c->frame_window, s->root,
xcb_create_window(globalconf.connection, globalconf.default_depth, c->frame_window, s->root,
wgeom->x, wgeom->y, wgeom->width, wgeom->height,
wgeom->border_width, XCB_COPY_FROM_PARENT, s->root_visual,
wgeom->border_width, XCB_COPY_FROM_PARENT, globalconf.visual->visual_id,
XCB_CW_BACK_PIXEL | XCB_CW_BORDER_PIXEL | XCB_CW_BIT_GRAVITY
| XCB_CW_WIN_GRAVITY | XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK,
(const uint32_t [])

View file

@ -130,7 +130,7 @@ wibox_draw_context_update(wibox_t *w)
/* we need a new pixmap this way [ ] to render */
w->ctx.pixmap = xcb_generate_id(globalconf.connection);
xcb_create_pixmap(globalconf.connection,
s->root_depth,
globalconf.default_depth,
w->ctx.pixmap, s->root,
w->geometry.height,
w->geometry.width);
@ -157,10 +157,10 @@ wibox_init(wibox_t *w)
xcb_screen_t *s = globalconf.screen;
w->window = xcb_generate_id(globalconf.connection);
xcb_create_window(globalconf.connection, s->root_depth, w->window, s->root,
xcb_create_window(globalconf.connection, globalconf.default_depth, w->window, s->root,
w->geometry.x, w->geometry.y,
w->geometry.width, w->geometry.height,
w->border_width, XCB_COPY_FROM_PARENT, s->root_visual,
w->border_width, XCB_COPY_FROM_PARENT, globalconf.visual->visual_id,
XCB_CW_BACK_PIXEL | XCB_CW_BORDER_PIXEL | XCB_CW_BIT_GRAVITY
| XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK,
(const uint32_t [])
@ -178,7 +178,7 @@ wibox_init(wibox_t *w)
/* Create a pixmap. */
w->pixmap = xcb_generate_id(globalconf.connection);
xcb_create_pixmap(globalconf.connection, s->root_depth, w->pixmap, s->root,
xcb_create_pixmap(globalconf.connection, globalconf.default_depth, w->pixmap, s->root,
w->geometry.width, w->geometry.height);
/* Update draw context physical screen, important for Zaphod. */
@ -243,7 +243,7 @@ wibox_moveresize(lua_State *L, int udx, area_t geometry)
xcb_free_pixmap(globalconf.connection, w->ctx.pixmap);
w->pixmap = xcb_generate_id(globalconf.connection);
xcb_screen_t *s = globalconf.screen;
xcb_create_pixmap(globalconf.connection, s->root_depth, w->pixmap, s->root,
xcb_create_pixmap(globalconf.connection, globalconf.default_depth, w->pixmap, s->root,
w->geometry.width, w->geometry.height);
wibox_draw_context_update(w);
}

View file

@ -42,11 +42,11 @@ systray_init(void)
xcb_screen_t *xscreen = globalconf.screen;
globalconf.systray.window = xcb_generate_id(globalconf.connection);
xcb_create_window(globalconf.connection, xscreen->root_depth,
xcb_create_window(globalconf.connection, globalconf.default_depth,
globalconf.systray.window,
xscreen->root,
-1, -1, 1, 1, 0,
XCB_COPY_FROM_PARENT, xscreen->root_visual, 0, NULL);
XCB_COPY_FROM_PARENT, globalconf.visual->visual_id, 0, NULL);
}