add support for Xinerama in max layout

This commit is contained in:
Julien Danjou 2007-09-21 18:18:01 +02:00
parent 40384806fd
commit d44e7bcbc4
1 changed files with 12 additions and 5 deletions

View File

@ -30,13 +30,20 @@ void
layout_max(Display *disp, awesome_config *awesomeconf) layout_max(Display *disp, awesome_config *awesomeconf)
{ {
Client *c; Client *c;
int dummy; int screen_number = 0, use_screen = 0;
ScreenInfo *si = get_screen_info(disp, awesomeconf->screen, awesomeconf->statusbar, &dummy); 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->selected_tags, awesomeconf->ntags)) if(IS_TILED(c, awesomeconf->screen, awesomeconf->selected_tags, awesomeconf->ntags))
resize(c, si[awesomeconf->screen].x_org, si[awesomeconf->screen].y_org, {
si[awesomeconf->screen].width - 2 * c->border, /* if xinerama */
si[awesomeconf->screen].height - 2 * c->border, awesomeconf->resize_hints); if(screen_number > 1)
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);
} }