use root window color depth instead of hard-coded 24
This commit is contained in:
parent
076636a835
commit
16ea766765
|
@ -181,8 +181,7 @@ static void open_placeholder_window(Con *con) {
|
||||||
state->con = con;
|
state->con = con;
|
||||||
state->rect = con->rect;
|
state->rect = con->rect;
|
||||||
state->pixmap = xcb_generate_id(restore_conn);
|
state->pixmap = xcb_generate_id(restore_conn);
|
||||||
// TODO: get rid of hardcoded 24
|
xcb_create_pixmap(restore_conn, root_depth, state->pixmap,
|
||||||
xcb_create_pixmap(restore_conn, 24, state->pixmap,
|
|
||||||
state->window, state->rect.width, state->rect.height);
|
state->window, state->rect.width, state->rect.height);
|
||||||
state->gc = xcb_generate_id(restore_conn);
|
state->gc = xcb_generate_id(restore_conn);
|
||||||
xcb_create_gc(restore_conn, state->gc, state->pixmap, XCB_GC_GRAPHICS_EXPOSURES, (uint32_t[]){ 0 });
|
xcb_create_gc(restore_conn, state->gc, state->pixmap, XCB_GC_GRAPHICS_EXPOSURES, (uint32_t[]){ 0 });
|
||||||
|
@ -268,8 +267,7 @@ static void configure_notify(xcb_configure_notify_event_t *event) {
|
||||||
xcb_free_gc(restore_conn, state->gc);
|
xcb_free_gc(restore_conn, state->gc);
|
||||||
|
|
||||||
state->pixmap = xcb_generate_id(restore_conn);
|
state->pixmap = xcb_generate_id(restore_conn);
|
||||||
// TODO: get rid of hardcoded 24
|
xcb_create_pixmap(restore_conn, root_depth, state->pixmap,
|
||||||
xcb_create_pixmap(restore_conn, 24, state->pixmap,
|
|
||||||
state->window, state->rect.width, state->rect.height);
|
state->window, state->rect.width, state->rect.height);
|
||||||
state->gc = xcb_generate_id(restore_conn);
|
state->gc = xcb_generate_id(restore_conn);
|
||||||
xcb_create_gc(restore_conn, state->gc, state->pixmap, XCB_GC_GRAPHICS_EXPOSURES, (uint32_t[]){ 0 });
|
xcb_create_gc(restore_conn, state->gc, state->pixmap, XCB_GC_GRAPHICS_EXPOSURES, (uint32_t[]){ 0 });
|
||||||
|
|
Loading…
Reference in New Issue