diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Screen.cc | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index fb6d518..ab1b707 100644 --- a/src/Screen.cc +++ b/src/Screen.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: Screen.cc,v 1.197 2003/06/30 15:31:54 fluxgen Exp $ | 25 | // $Id: Screen.cc,v 1.198 2003/06/30 18:04:48 fluxgen Exp $ |
26 | 26 | ||
27 | 27 | ||
28 | #include "Screen.hh" | 28 | #include "Screen.hh" |
@@ -565,30 +565,40 @@ Pixmap BScreen::rootPixmap() const { | |||
565 | } | 565 | } |
566 | 566 | ||
567 | unsigned int BScreen::maxLeft(int head) const { | 567 | unsigned int BScreen::maxLeft(int head) const { |
568 | // we ignore strut if we're doing full maximization | ||
568 | if (hasXinerama()) | 569 | if (hasXinerama()) |
569 | return getHeadX(head); | 570 | return doFullMax() ? getHeadX(head) : |
570 | else // we ignore strut if we're doing full maximization | 571 | getHeadX(head) + m_available_workspace_area->left(); |
572 | else | ||
571 | return doFullMax() ? 0 : m_available_workspace_area->left(); | 573 | return doFullMax() ? 0 : m_available_workspace_area->left(); |
572 | } | 574 | } |
573 | 575 | ||
574 | unsigned int BScreen::maxRight(int head) const { | 576 | unsigned int BScreen::maxRight(int head) const { |
577 | // we ignore strut if we're doing full maximization | ||
575 | if (hasXinerama()) | 578 | if (hasXinerama()) |
576 | return getHeadX(head) + getHeadWidth(head); | 579 | return doFullMax() ? getHeadX(head) + getHeadWidth(head) : |
577 | else // we ignore strut if we're doing full maximization | 580 | getHeadX(head) + getHeadWidth(head) - m_available_workspace_area->right(); |
581 | else | ||
578 | return doFullMax() ? width() : width() - m_available_workspace_area->right(); | 582 | return doFullMax() ? width() : width() - m_available_workspace_area->right(); |
579 | } | 583 | } |
580 | 584 | ||
581 | unsigned int BScreen::maxTop(int head) const { | 585 | unsigned int BScreen::maxTop(int head) const { |
586 | |||
587 | // we ignore strut if we're doing full maximization | ||
588 | |||
582 | if (hasXinerama()) | 589 | if (hasXinerama()) |
583 | return getHeadY(head); | 590 | return doFullMax() ? getHeadY(head) : getHeadY(head) + m_available_workspace_area->top(); |
584 | else // we ignore strut if we're doing full maximization | 591 | else |
585 | return doFullMax() ? 0 : m_available_workspace_area->top(); | 592 | return doFullMax() ? 0 : m_available_workspace_area->top(); |
586 | } | 593 | } |
587 | 594 | ||
588 | unsigned int BScreen::maxBottom(int head) const { | 595 | unsigned int BScreen::maxBottom(int head) const { |
596 | // we ignore strut if we're doing full maximization | ||
597 | |||
589 | if (hasXinerama()) | 598 | if (hasXinerama()) |
590 | return getHeadY(head) + getHeadHeight(head); | 599 | return doFullMax() ? getHeadY(head) + getHeadHeight(head) : |
591 | else // we ignore strut if we're doing full maximization | 600 | getHeadY(head) + getHeadHeight(head) - m_available_workspace_area->bottom(); |
601 | else | ||
592 | return doFullMax() ? height() : height() - m_available_workspace_area->bottom(); | 602 | return doFullMax() ? height() : height() - m_available_workspace_area->bottom(); |
593 | } | 603 | } |
594 | 604 | ||