diff --git a/objects/client.c b/objects/client.c index 0161520ff..d0f3efa5a 100644 --- a/objects/client.c +++ b/objects/client.c @@ -432,7 +432,8 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, bool startup) wgeom->x, wgeom->y, wgeom->width, wgeom->height, 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, + | XCB_CW_WIN_GRAVITY | XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK + | XCB_CW_COLORMAP, (const uint32_t []) { globalconf.colors.bg.pixel, @@ -440,7 +441,8 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, bool startup) XCB_GRAVITY_NORTH_WEST, XCB_GRAVITY_NORTH_WEST, 1, - FRAME_SELECT_INPUT_EVENT_MASK + FRAME_SELECT_INPUT_EVENT_MASK, + globalconf.default_cmap }); xcb_reparent_window(globalconf.connection, w, c->frame_window, 0, 0); xcb_map_window(globalconf.connection, w); diff --git a/objects/wibox.c b/objects/wibox.c index 043c56a9d..9e757538e 100644 --- a/objects/wibox.c +++ b/objects/wibox.c @@ -162,7 +162,7 @@ wibox_init(wibox_t *w) w->geometry.width, w->geometry.height, 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, + | XCB_CW_OVERRIDE_REDIRECT | XCB_CW_EVENT_MASK | XCB_CW_COLORMAP, (const uint32_t []) { w->ctx.bg.pixel, @@ -173,7 +173,8 @@ wibox_init(wibox_t *w) | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW | XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_POINTER_MOTION | XCB_EVENT_MASK_EXPOSURE - | XCB_EVENT_MASK_PROPERTY_CHANGE + | XCB_EVENT_MASK_PROPERTY_CHANGE, + globalconf.default_cmap }); /* Create a pixmap. */ diff --git a/systray.c b/systray.c index a86550acb..0c9accbee 100644 --- a/systray.c +++ b/systray.c @@ -46,7 +46,14 @@ systray_init(void) globalconf.systray.window, xscreen->root, -1, -1, 1, 1, 0, - XCB_COPY_FROM_PARENT, globalconf.visual->visual_id, 0, NULL); + XCB_COPY_FROM_PARENT, globalconf.visual->visual_id, + XCB_CW_BACK_PIXEL | XCB_CW_BORDER_PIXEL | XCB_CW_COLORMAP, + (const uint32_t []) + { + globalconf.colors.bg.pixel, + globalconf.colors.bg.pixel, + globalconf.default_cmap + }); }