mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-16 07:47:22 +01:00
Create a temporary window for globalconf.gc
We don't have any window with globalconf.depth yet at this point, so we have to create one just for setting up our GC. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
e762a22f49
commit
371536a396
1 changed files with 14 additions and 1 deletions
15
awesome.c
15
awesome.c
|
@ -464,9 +464,22 @@ main(int argc, char **argv)
|
|||
|
||||
/* The default GC is just a newly created associated with a window with
|
||||
* depth globalconf.default_depth */
|
||||
xcb_window_t tmp_win = xcb_generate_id(globalconf.connection);
|
||||
globalconf.gc = xcb_generate_id(globalconf.connection);
|
||||
xcb_create_gc(globalconf.connection, globalconf.gc, globalconf.systray.window, XCB_GC_FOREGROUND | XCB_GC_BACKGROUND,
|
||||
xcb_create_window(globalconf.connection, globalconf.default_depth,
|
||||
tmp_win, globalconf.screen->root,
|
||||
-1, -1, 1, 1, 0,
|
||||
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
|
||||
});
|
||||
xcb_create_gc(globalconf.connection, globalconf.gc, tmp_win, XCB_GC_FOREGROUND | XCB_GC_BACKGROUND,
|
||||
(const uint32_t[]) { globalconf.screen->black_pixel, globalconf.screen->white_pixel });
|
||||
xcb_destroy_window(globalconf.connection, tmp_win);
|
||||
|
||||
/* Parse and run configuration file */
|
||||
if (!luaA_parserc(&xdg, confpath, true))
|
||||
|
|
Loading…
Reference in a new issue