diff --git a/awesome.c b/awesome.c index d05af4aee..a74cdb3b3 100644 --- a/awesome.c +++ b/awesome.c @@ -359,6 +359,8 @@ main(int argc, char **argv) fatal("cannot open display"); globalconf.screen = xcb_aux_get_screen(globalconf.connection, globalconf.default_screen); + globalconf.default_depth = globalconf.screen->root_depth; + globalconf.default_cmap = globalconf.screen->default_colormap; /* The default GC is just a newly created associated to the root window */ globalconf.gc = xcb_generate_id(globalconf.connection); diff --git a/globalconf.h b/globalconf.h index b833f2bf8..481aa0bc3 100644 --- a/globalconf.h +++ b/globalconf.h @@ -115,6 +115,10 @@ typedef struct xcb_screen_t *screen; /** A graphic context. */ xcb_gcontext_t gc; + /** Our default depth */ + uint8_t default_depth; + /** Our default color map */ + xcb_colormap_t default_cmap; } awesome_t; extern awesome_t globalconf;