Associate our default GC with the systray window
The window that is specified when a GC is created is used for two things. First, it specifies which protocol screen the GC should be associated with. Second, it specifies for which color depth the GC is valid. Due to this second property, we have to use the systray window instead of the root window. The systray window uses globalconf.default_depth. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
aca253420d
commit
8ea94154a6
12
awesome.c
12
awesome.c
|
@ -378,12 +378,6 @@ main(int argc, char **argv)
|
||||||
globalconf.default_depth = globalconf.screen->root_depth;
|
globalconf.default_depth = globalconf.screen->root_depth;
|
||||||
globalconf.default_cmap = globalconf.screen->default_colormap;
|
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);
|
|
||||||
xcb_create_gc(globalconf.connection, globalconf.gc, globalconf.screen->root, XCB_GC_FOREGROUND | XCB_GC_BACKGROUND,
|
|
||||||
(const uint32_t[]) { globalconf.screen->black_pixel, globalconf.screen->white_pixel });
|
|
||||||
|
|
||||||
|
|
||||||
/* Prefetch all the extensions we might need */
|
/* Prefetch all the extensions we might need */
|
||||||
xcb_prefetch_extension_data(globalconf.connection, &xcb_big_requests_id);
|
xcb_prefetch_extension_data(globalconf.connection, &xcb_big_requests_id);
|
||||||
xcb_prefetch_extension_data(globalconf.connection, &xcb_test_id);
|
xcb_prefetch_extension_data(globalconf.connection, &xcb_test_id);
|
||||||
|
@ -468,6 +462,12 @@ main(int argc, char **argv)
|
||||||
/* init spawn (sn) */
|
/* init spawn (sn) */
|
||||||
spawn_init();
|
spawn_init();
|
||||||
|
|
||||||
|
/* The default GC is just a newly created associated with a window with
|
||||||
|
* depth globalconf.default_depth */
|
||||||
|
globalconf.gc = xcb_generate_id(globalconf.connection);
|
||||||
|
xcb_create_gc(globalconf.connection, globalconf.gc, globalconf.systray.window, XCB_GC_FOREGROUND | XCB_GC_BACKGROUND,
|
||||||
|
(const uint32_t[]) { globalconf.screen->black_pixel, globalconf.screen->white_pixel });
|
||||||
|
|
||||||
/* Parse and run configuration file */
|
/* Parse and run configuration file */
|
||||||
if (!luaA_parserc(&xdg, confpath, true))
|
if (!luaA_parserc(&xdg, confpath, true))
|
||||||
fatal("couldn't find any rc file");
|
fatal("couldn't find any rc file");
|
||||||
|
|
Loading…
Reference in New Issue