Add variables for tracking some X11 defaults

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2010-09-30 12:48:24 +02:00
parent 06e11cd5d1
commit eef3fdb452
2 changed files with 6 additions and 0 deletions

View File

@ -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);

View File

@ -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;