Move root window initialization to func "dwm_main"

This commit is contained in:
Alex Kotov 2021-11-22 08:41:10 +05:00
parent 0379a24471
commit 269987ab21
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
1 changed files with 2 additions and 1 deletions

View File

@ -311,6 +311,8 @@ int dwm_main(const char *const new_program_title)
screen_init();
root = RootWindow(dpy, screen.x_screen);
// Old code.
if (!setup()) {
@ -1801,7 +1803,6 @@ bool setup()
{
XSetWindowAttributes wa;
root = RootWindow(dpy, screen.x_screen);
drw = drw_create(dpy, screen.x_screen, root, screen.sizes.w, screen.sizes.h);
if (!drw_fontset_create(drw, fonts, LENGTH(fonts)))
fatal("no fonts could be loaded.");