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

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.");