add support for Xinerama in max layout
This commit is contained in:
parent
40384806fd
commit
d44e7bcbc4
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue