Move screen to func "dwm_main"
This commit is contained in:
parent
269987ab21
commit
854e9941a3
1 changed files with 3 additions and 9 deletions
12
src/dwm.c
12
src/dwm.c
|
@ -192,7 +192,6 @@ static void restack(Monitor *m);
|
||||||
static void run();
|
static void run();
|
||||||
static void scan();
|
static void scan();
|
||||||
static void scheme_destroy();
|
static void scheme_destroy();
|
||||||
static void screen_init();
|
|
||||||
static int sendevent(Client *c, Atom proto);
|
static int sendevent(Client *c, Atom proto);
|
||||||
static void sendmon(Client *c, Monitor *m);
|
static void sendmon(Client *c, Monitor *m);
|
||||||
static void setclientstate(Client *c, long state);
|
static void setclientstate(Client *c, long state);
|
||||||
|
@ -309,7 +308,9 @@ int dwm_main(const char *const new_program_title)
|
||||||
fatal("cannot create atoms");
|
fatal("cannot create atoms");
|
||||||
}
|
}
|
||||||
|
|
||||||
screen_init();
|
screen.x_screen = DefaultScreen(dpy);
|
||||||
|
screen.sizes.w = DisplayWidth(dpy, screen.x_screen);
|
||||||
|
screen.sizes.h = DisplayHeight(dpy, screen.x_screen);
|
||||||
|
|
||||||
root = RootWindow(dpy, screen.x_screen);
|
root = RootWindow(dpy, screen.x_screen);
|
||||||
|
|
||||||
|
@ -1651,13 +1652,6 @@ void scheme_destroy()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void screen_init()
|
|
||||||
{
|
|
||||||
screen.x_screen = DefaultScreen(dpy);
|
|
||||||
screen.sizes.w = DisplayWidth(dpy, screen.x_screen);
|
|
||||||
screen.sizes.h = DisplayHeight(dpy, screen.x_screen);
|
|
||||||
}
|
|
||||||
|
|
||||||
void sendmon(Client *c, Monitor *m)
|
void sendmon(Client *c, Monitor *m)
|
||||||
{
|
{
|
||||||
if (c->mon == m)
|
if (c->mon == m)
|
||||||
|
|
Loading…
Reference in a new issue