diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/BaseDisplay.cc | 19 | ||||
-rw-r--r-- | src/BaseDisplay.hh | 6 | ||||
-rw-r--r-- | src/Makefile.am | 2 |
3 files changed, 14 insertions, 13 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) { |
diff --git a/src/BaseDisplay.hh b/src/BaseDisplay.hh index d7075c1..30e90c0 100644 --- a/src/BaseDisplay.hh +++ b/src/BaseDisplay.hh | |||
@@ -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.hh,v 1.17 2002/03/19 21:19:55 fluxgen Exp $ | 25 | // $Id: BaseDisplay.hh,v 1.18 2002/03/23 02:02:01 pekdon Exp $ |
26 | 26 | ||
27 | #ifndef BASEDISPLAY_HH | 27 | #ifndef BASEDISPLAY_HH |
28 | #define BASEDISPLAY_HH | 28 | #define BASEDISPLAY_HH |
@@ -172,8 +172,8 @@ public: | |||
172 | unsigned int getCurrHead(void) const; | 172 | unsigned int getCurrHead(void) const; |
173 | unsigned int getHeadWidth(unsigned int head) const; | 173 | unsigned int getHeadWidth(unsigned int head) const; |
174 | unsigned int getHeadHeight(unsigned int head) const; | 174 | unsigned int getHeadHeight(unsigned int head) const; |
175 | int getHeadX(unsigned int head); | 175 | int getHeadX(unsigned int head) const; |
176 | int getHeadY(unsigned int head); | 176 | int getHeadY(unsigned int head) const; |
177 | #endif // XINERAMA | 177 | #endif // XINERAMA |
178 | 178 | ||
179 | private: | 179 | private: |
diff --git a/src/Makefile.am b/src/Makefile.am index 0d71fa3..6d0d201 100644 --- a/src/Makefile.am +++ b/src/Makefile.am | |||
@@ -30,7 +30,7 @@ DEFAULT_KEYSFILE=$(pkgdatadir)/keys | |||
30 | DEFAULT_INITFILE= | 30 | DEFAULT_INITFILE= |
31 | 31 | ||
32 | CPPFLAGS= -Wall @CPPFLAGS@ @SHAPE@ @SLIT@ @INTERLACE@ @ORDEREDPSEUDO@ \ | 32 | CPPFLAGS= -Wall @CPPFLAGS@ @SHAPE@ @SLIT@ @INTERLACE@ @ORDEREDPSEUDO@ \ |
33 | @DEBUG@ @NEWWMSPEC@ @NLS@ @TIMEDCACHE@ @KDE@ @GNOME@ \ | 33 | @DEBUG@ @NEWWMSPEC@ @NLS@ @TIMEDCACHE@ @KDE@ @GNOME@ @XINERAMA@ \ |
34 | -DLOCALEPATH=\"$(pkgdatadir)/nls\" \ | 34 | -DLOCALEPATH=\"$(pkgdatadir)/nls\" \ |
35 | -DDEFAULTMENU=\"$(DEFAULT_MENU)\" \ | 35 | -DDEFAULTMENU=\"$(DEFAULT_MENU)\" \ |
36 | -DDEFAULTSTYLE=\"$(DEFAULT_STYLE)\" \ | 36 | -DDEFAULTSTYLE=\"$(DEFAULT_STYLE)\" \ |