diff --git a/color.c b/color.c index 9487b5515..f45e91655 100644 --- a/color.c +++ b/color.c @@ -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)); diff --git a/objects/client.c b/objects/client.c index f7b1e91f5..0161520ff 100644 --- a/objects/client.c +++ b/objects/client.c @@ -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 []) diff --git a/objects/wibox.c b/objects/wibox.c index ed6e1344f..043c56a9d 100644 --- a/objects/wibox.c +++ b/objects/wibox.c @@ -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); } diff --git a/systray.c b/systray.c index a9df38650..a86550acb 100644 --- a/systray.c +++ b/systray.c @@ -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); }