fix restart stuff

This commit is contained in:
Julien Danjou 2008-01-23 20:58:05 +01:00
parent 3b899c4922
commit 595003b8e1
1 changed files with 6 additions and 2 deletions

View File

@ -289,6 +289,8 @@ main(int argc, char *argv[])
/* parse config */ /* parse config */
config_parse(confpath); config_parse(confpath);
scan();
/* for each virtual screen */ /* for each virtual screen */
for(screen = 0; screen < globalconf.nscreens; screen++) for(screen = 0; screen < globalconf.nscreens; screen++)
setup(screen); setup(screen);
@ -331,8 +333,6 @@ main(int argc, char *argv[])
handler[randr_event_base + RRScreenChangeNotify] = handle_event_randr_screen_change_notify; handler[randr_event_base + RRScreenChangeNotify] = handle_event_randr_screen_change_notify;
} }
scan();
XSync(dpy, False); XSync(dpy, False);
/* get socket fd */ /* get socket fd */
@ -357,6 +357,10 @@ main(int argc, char *argv[])
signal(SIGTERM, &exit_on_signal); signal(SIGTERM, &exit_on_signal);
signal(SIGHUP, &exit_on_signal); signal(SIGHUP, &exit_on_signal);
/* refresh everything before waiting events */
statusbar_refresh();
layout_refresh();
/* main event loop, also reads status text from socket */ /* main event loop, also reads status text from socket */
while(running) while(running)
{ {