From 5602e9e76b27bf8b059a573622ae12997f7b2fda Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 20 Sep 2007 23:08:20 +0200 Subject: [PATCH] latest commit introduced a regression in multi-head tile support, fix that --- layouts/tile.c | 7 ++++++- screen.c | 10 +++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/layouts/tile.c b/layouts/tile.c index 59995ff2..93ac019c 100644 --- a/layouts/tile.c +++ b/layouts/tile.c @@ -110,7 +110,12 @@ _tile(Display *disp, awesome_config *awesomeconf, const Bool right) && ((i - last_i) >= masterwin + otherwin || n == screen_numbers))) { - use_screen++; + /* for multi-head without Xinerama */ + if(screen_numbers != 1) + use_screen++; + else + use_screen = awesomeconf->screen; + last_i = i; wah = screens_info[use_screen].height; diff --git a/screen.c b/screen.c index 5b600d1e..9a3221e9 100644 --- a/screen.c +++ b/screen.c @@ -32,23 +32,27 @@ ScreenInfo * get_screen_info(Display *disp, int screen, Statusbar statusbar, int *screen_number) { - int i; + int i, fake_screen_number = 0; ScreenInfo *si; if(XineramaIsActive(disp)) + { si = XineramaQueryScreens(disp, screen_number); + fake_screen_number = *screen_number; + } else { /* emulate Xinerama info but only fill the screen we want */ - *screen_number = screen + 1; + *screen_number = 1; si = p_new(ScreenInfo, screen + 1); si[screen].width = DisplayWidth(disp, screen); si[screen].height = DisplayHeight(disp, screen); si[screen].x_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 || statusbar.position == BarBot)