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

View File

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