get the right rects for the xinerama regions

This commit is contained in:
Dana Jansens 2002-07-22 02:07:36 +00:00
parent f7122039db
commit 9fe6b282c0
2 changed files with 16 additions and 14 deletions

View file

@ -493,20 +493,22 @@ ScreenInfo::ScreenInfo(BaseDisplay *d, unsigned int num) {
on a pre-screen basis anyways. on a pre-screen basis anyways.
*/ */
xinerama_active = XineramaIsActive(d->getXDisplay()); xinerama_active = XineramaIsActive(d->getXDisplay());
/* if (xinerama_active) {
If Xinerama is being used, there there is only going to be one screen /*
present. We still, of course, want to use the screen class, but that is If Xinerama is being used, there there is only going to be one screen
why no screen number is used in this function call. There should never present. We still, of course, want to use the screen class, but that
be more than one screen present with Xinerama active. is why no screen number is used in this function call. There should
*/ never be more than one screen present with Xinerama active.
int num; */
XineramaScreenInfo *info = XineramaQueryScreens(d->getXDisplay(), &num); int num;
if (num > 0 && info) { XineramaScreenInfo *info = XineramaQueryScreens(d->getXDisplay(), &num);
for (int i = 0; i < num; ++i) { if (num > 0 && info) {
xinerama_areas.push_back(Rect(info[i].x_org, info[i].y_org, for (int i = 0; i < num; ++i) {
info[i].width, info[i].height)); xinerama_areas.push_back(Rect(info[i].x_org, info[i].y_org,
info[i].width, info[i].height));
}
XFree(info);
} }
XFree(info);
} }
} }
} }

View file

@ -2093,7 +2093,7 @@ void BScreen::updateAvailableArea(void) {
#ifdef XINERAMA #ifdef XINERAMA
// reset to the full areas // reset to the full areas
if (isXineramaActive()) if (isXineramaActive())
xineramaUsableArea = allAvailableAreas(); xineramaUsableArea = getXineramaAreas();
#endif // XINERAMA #endif // XINERAMA
/* these values represent offsets from the screen edge /* these values represent offsets from the screen edge