diff options
author | pekdon <pekdon> | 2002-03-23 02:02:01 (GMT) |
---|---|---|
committer | pekdon <pekdon> | 2002-03-23 02:02:01 (GMT) |
commit | e133cf83a332a72ca42be5e223834d4e6aa0a2e8 (patch) | |
tree | 72585011623d644257f362dbece3ab3a0b9a4119 /src/BaseDisplay.cc | |
parent | 1022df421227aea29259204ce69b93df16c0f7db (diff) | |
download | fluxbox_pavel-e133cf83a332a72ca42be5e223834d4e6aa0a2e8.zip fluxbox_pavel-e133cf83a332a72ca42be5e223834d4e6aa0a2e8.tar.bz2 |
Xinerama
Diffstat (limited to 'src/BaseDisplay.cc')
-rw-r--r-- | src/BaseDisplay.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/BaseDisplay.cc b/src/BaseDisplay.cc index cb3ca28..d92c533 100644 --- a/src/BaseDisplay.cc +++ b/src/BaseDisplay.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: BaseDisplay.cc,v 1.10 2002/03/19 21:19:55 fluxgen Exp $ | 25 | // $Id: BaseDisplay.cc,v 1.11 2002/03/23 02:02:00 pekdon Exp $ |
26 | 26 | ||
27 | // use GNU extensions | 27 | // use GNU extensions |
28 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -454,28 +454,29 @@ ScreenInfo::~ScreenInfo(void) { | |||
454 | // x,y. If it fails or Xinerama isn't | 454 | // x,y. If it fails or Xinerama isn't |
455 | // activated it'll return head nr 0 | 455 | // activated it'll return head nr 0 |
456 | //----------------------------------------- | 456 | //----------------------------------------- |
457 | unsigned int ScreenInfo::getHead(int x, int y) { | 457 | unsigned int ScreenInfo::getHead(int x, int y) const { |
458 | 458 | ||
459 | // is Xinerama extensions enabled? | 459 | // is Xinerama extensions enabled? |
460 | if (hasXinerama()) { | 460 | if (hasXinerama()) { |
461 | // check if last head is still active | 461 | // check if last head is still active |
462 | if ((xineramaInfos[xineramaLastHead].x_org <= x) && | 462 | /* if ((xineramaInfos[xineramaLastHead].x_org <= x) && |
463 | ((xineramaInfos[xineramaLastHead].x_org + | 463 | ((xineramaInfos[xineramaLastHead].x_org + |
464 | xineramaInfos[xineramaLastHead].width) > x) && | 464 | xineramaInfos[xineramaLastHead].width) > x) && |
465 | (xineramaInfos[xineramaLastHead].y_org <= y) && | 465 | (xineramaInfos[xineramaLastHead].y_org <= y) && |
466 | ((xineramaInfos[xineramaLastHead].y_org + | 466 | ((xineramaInfos[xineramaLastHead].y_org + |
467 | xineramaInfos[xineramaLastHead].height) > y)) { | 467 | xineramaInfos[xineramaLastHead].height) > y)) { |
468 | return xineramaLastHead; | 468 | return xineramaLastHead; |
469 | } else { | 469 | } else { */ |
470 | // go trough all the heads, and search | 470 | // go trough all the heads, and search |
471 | for (int i = 0; (signed) i < xineramaNumHeads; i++) { | 471 | for (int i = 0; (signed) i < xineramaNumHeads; i++) { |
472 | if (xineramaInfos[i].x_org <= x && | 472 | if (xineramaInfos[i].x_org <= x && |
473 | xineramaInfos[i].x_org + xineramaInfos[i].width) > x && | 473 | (xineramaInfos[i].x_org + xineramaInfos[i].width) > x && |
474 | xineramaInfos[i].y_org <= y && | 474 | xineramaInfos[i].y_org <= y && |
475 | xineramaInfos[i].y_org + xineramaInfos[i].height) > y) | 475 | (xineramaInfos[i].y_org + xineramaInfos[i].height) > y) |
476 | return (xineramaLastHead = i); | 476 | // return (xineramaLastHead = i); |
477 | return i; | ||
477 | } | 478 | } |
478 | } | 479 | // } |
479 | } | 480 | } |
480 | 481 | ||
481 | return 0; | 482 | return 0; |
@@ -506,7 +507,7 @@ unsigned int ScreenInfo::getCurrHead(void) const { | |||
506 | //----------- getHeadWidth ------------ | 507 | //----------- getHeadWidth ------------ |
507 | // Returns the width of head | 508 | // Returns the width of head |
508 | //------------------------------------- | 509 | //------------------------------------- |
509 | unsigned int ScreenInfo::getHeadWidth(unsigned int head) { | 510 | unsigned int ScreenInfo::getHeadWidth(unsigned int head) const { |
510 | 511 | ||
511 | if (hasXinerama()) { | 512 | if (hasXinerama()) { |
512 | if ((signed) head >= xineramaNumHeads) { | 513 | if ((signed) head >= xineramaNumHeads) { |