Make sure we set some required values on windows
All windows which use globalconf.default_depth must also have a backpixel, borderpixel and colormap set when they are created. Without this, all these xcb_create_window() calls would fail when globalconf.default_depth is no longer the screen's default depth. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
cbf9bbd66a
commit
aca253420d
|
@ -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->x, wgeom->y, wgeom->width, wgeom->height,
|
||||||
wgeom->border_width, XCB_COPY_FROM_PARENT, globalconf.visual->visual_id,
|
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_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 [])
|
(const uint32_t [])
|
||||||
{
|
{
|
||||||
globalconf.colors.bg.pixel,
|
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,
|
||||||
XCB_GRAVITY_NORTH_WEST,
|
XCB_GRAVITY_NORTH_WEST,
|
||||||
1,
|
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_reparent_window(globalconf.connection, w, c->frame_window, 0, 0);
|
||||||
xcb_map_window(globalconf.connection, w);
|
xcb_map_window(globalconf.connection, w);
|
||||||
|
|
|
@ -162,7 +162,7 @@ wibox_init(wibox_t *w)
|
||||||
w->geometry.width, w->geometry.height,
|
w->geometry.width, w->geometry.height,
|
||||||
w->border_width, XCB_COPY_FROM_PARENT, globalconf.visual->visual_id,
|
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_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 [])
|
(const uint32_t [])
|
||||||
{
|
{
|
||||||
w->ctx.bg.pixel,
|
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_SUBSTRUCTURE_NOTIFY | XCB_EVENT_MASK_ENTER_WINDOW
|
||||||
| XCB_EVENT_MASK_LEAVE_WINDOW | XCB_EVENT_MASK_STRUCTURE_NOTIFY
|
| XCB_EVENT_MASK_LEAVE_WINDOW | XCB_EVENT_MASK_STRUCTURE_NOTIFY
|
||||||
| XCB_EVENT_MASK_POINTER_MOTION | XCB_EVENT_MASK_EXPOSURE
|
| 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. */
|
/* Create a pixmap. */
|
||||||
|
|
|
@ -46,7 +46,14 @@ systray_init(void)
|
||||||
globalconf.systray.window,
|
globalconf.systray.window,
|
||||||
xscreen->root,
|
xscreen->root,
|
||||||
-1, -1, 1, 1, 0,
|
-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
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue