max layout is now Xinerama aware

This commit is contained in:
Julien Danjou 2007-09-27 19:34:41 +02:00
parent d3ace8b9e8
commit 972ea8f832
1 changed files with 4 additions and 11 deletions

View File

@ -30,20 +30,13 @@ void
layout_max(Display *disp, awesome_config *awesomeconf) layout_max(Display *disp, awesome_config *awesomeconf)
{ {
Client *c; Client *c;
int screen_number = 0, use_screen = 0; int screen_number = 0;
ScreenInfo *si = get_screen_info(disp, awesomeconf->screen, &awesomeconf->statusbar, &screen_number); ScreenInfo *si = get_screen_info(disp, awesomeconf->screen, &awesomeconf->statusbar, &screen_number);
for(c = clients; c; c = c->next) for(c = clients; c; c = c->next)
if(IS_TILED(c, awesomeconf->screen, awesomeconf->tags, awesomeconf->ntags)) if(IS_TILED(c, awesomeconf->screen, awesomeconf->tags, awesomeconf->ntags))
{ resize(c, si[awesomeconf->screen].x_org, si[awesomeconf->screen].y_org,
/* if xinerama */ si[awesomeconf->screen].width - 2 * c->border,
if(screen_number > 1) si[awesomeconf->screen].height - 2 * c->border, awesomeconf->resize_hints);
use_screen = (use_screen == screen_number - 1) ? 0 : use_screen + 1;
else
use_screen = awesomeconf->screen;
resize(c, si[use_screen].x_org, si[use_screen].y_org,
si[use_screen].width - 2 * c->border,
si[use_screen].height - 2 * c->border, awesomeconf->resize_hints);
}
XFree(si); XFree(si);
} }