stop using get_screen_count()

This commit is contained in:
Julien Danjou 2008-01-22 18:37:48 +01:00
parent b27208d9d1
commit 29eccefc44
2 changed files with 5 additions and 6 deletions

View File

@ -216,7 +216,7 @@ main(int argc, char *argv[])
XEvent ev; XEvent ev;
Display * dpy; Display * dpy;
int shape_event, randr_event_base; int shape_event, randr_event_base;
int screen, screen_count; int screen;
int i, cmdlen; int i, cmdlen;
event_handler **handler; event_handler **handler;
struct sockaddr_un *addr; struct sockaddr_un *addr;
@ -283,16 +283,15 @@ main(int argc, char *argv[])
ewmh_init_atoms(); ewmh_init_atoms();
/* init screens struct */ /* init screens struct */
screen_count = get_screen_count(); globalconf.nscreens = get_screen_count();
globalconf.screens = p_new(VirtScreen, screen_count); globalconf.screens = p_new(VirtScreen, globalconf.nscreens);
globalconf.nscreens = screen_count;
focus_add_client(NULL); focus_add_client(NULL);
/* parse config */ /* parse config */
config_parse(confpath); config_parse(confpath);
/* for each virtual screen */ /* for each virtual screen */
for(screen = 0; screen < get_screen_count(); screen++) for(screen = 0; screen < globalconf.nscreens; screen++)
setup(screen); setup(screen);
/* do this only for real screen */ /* do this only for real screen */

View File

@ -100,7 +100,7 @@ layout_refresh(void)
int screen; int screen;
Bool arranged = False; Bool arranged = False;
for(screen = 0; screen < get_screen_count(); screen++) for(screen = 0; screen < globalconf.nscreens; screen++)
if(globalconf.screens[screen].need_arrange) if(globalconf.screens[screen].need_arrange)
{ {
arrange(screen); arrange(screen);