latest commit introduced a regression in multi-head tile support, fix that

This commit is contained in:
Julien Danjou 2007-09-20 23:08:20 +02:00
parent e2883bf28b
commit 5602e9e76b
2 changed files with 13 additions and 4 deletions

View File

@ -110,7 +110,12 @@ _tile(Display *disp, awesome_config *awesomeconf, const Bool right)
&& ((i - last_i) >= masterwin + otherwin && ((i - last_i) >= masterwin + otherwin
|| n == screen_numbers))) || n == screen_numbers)))
{ {
/* for multi-head without Xinerama */
if(screen_numbers != 1)
use_screen++; use_screen++;
else
use_screen = awesomeconf->screen;
last_i = i; last_i = i;
wah = screens_info[use_screen].height; wah = screens_info[use_screen].height;

View File

@ -32,23 +32,27 @@
ScreenInfo * ScreenInfo *
get_screen_info(Display *disp, int screen, Statusbar statusbar, int *screen_number) get_screen_info(Display *disp, int screen, Statusbar statusbar, int *screen_number)
{ {
int i; int i, fake_screen_number = 0;
ScreenInfo *si; ScreenInfo *si;
if(XineramaIsActive(disp)) if(XineramaIsActive(disp))
{
si = XineramaQueryScreens(disp, screen_number); si = XineramaQueryScreens(disp, screen_number);
fake_screen_number = *screen_number;
}
else else
{ {
/* emulate Xinerama info but only fill the screen we want */ /* emulate Xinerama info but only fill the screen we want */
*screen_number = screen + 1; *screen_number = 1;
si = p_new(ScreenInfo, screen + 1); si = p_new(ScreenInfo, screen + 1);
si[screen].width = DisplayWidth(disp, screen); si[screen].width = DisplayWidth(disp, screen);
si[screen].height = DisplayHeight(disp, screen); si[screen].height = DisplayHeight(disp, screen);
si[screen].x_org = 0; si[screen].x_org = 0;
si[screen].y_org = 0; si[screen].y_org = 0;
fake_screen_number = screen + 1;
} }
for(i = 0; i < *screen_number; i++) for(i = 0; i < fake_screen_number; i++)
{ {
if(statusbar.position == BarTop if(statusbar.position == BarTop
|| statusbar.position == BarBot) || statusbar.position == BarBot)