From 952759281aab207016eaaac2b6cfc9e6b4a1ab71 Mon Sep 17 00:00:00 2001 From: fluxgen <fluxgen> Date: Mon, 30 Jun 2003 18:04:48 +0000 Subject: fixed xinerama bug in maximization stop --- src/Screen.cc | 28 +++++++++++++++++++--------- 1 file 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 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.197 2003/06/30 15:31:54 fluxgen Exp $ +// $Id: Screen.cc,v 1.198 2003/06/30 18:04:48 fluxgen Exp $ #include "Screen.hh" @@ -565,30 +565,40 @@ Pixmap BScreen::rootPixmap() const { } unsigned int BScreen::maxLeft(int head) const { + // we ignore strut if we're doing full maximization if (hasXinerama()) - return getHeadX(head); - else // we ignore strut if we're doing full maximization + return doFullMax() ? getHeadX(head) : + getHeadX(head) + m_available_workspace_area->left(); + else return doFullMax() ? 0 : m_available_workspace_area->left(); } unsigned int BScreen::maxRight(int head) const { + // we ignore strut if we're doing full maximization if (hasXinerama()) - return getHeadX(head) + getHeadWidth(head); - else // we ignore strut if we're doing full maximization + return doFullMax() ? getHeadX(head) + getHeadWidth(head) : + getHeadX(head) + getHeadWidth(head) - m_available_workspace_area->right(); + else return doFullMax() ? width() : width() - m_available_workspace_area->right(); } unsigned int BScreen::maxTop(int head) const { + + // we ignore strut if we're doing full maximization + if (hasXinerama()) - return getHeadY(head); - else // we ignore strut if we're doing full maximization + return doFullMax() ? getHeadY(head) : getHeadY(head) + m_available_workspace_area->top(); + else return doFullMax() ? 0 : m_available_workspace_area->top(); } unsigned int BScreen::maxBottom(int head) const { + // we ignore strut if we're doing full maximization + if (hasXinerama()) - return getHeadY(head) + getHeadHeight(head); - else // we ignore strut if we're doing full maximization + return doFullMax() ? getHeadY(head) + getHeadHeight(head) : + getHeadY(head) + getHeadHeight(head) - m_available_workspace_area->bottom(); + else return doFullMax() ? height() : height() - m_available_workspace_area->bottom(); } -- cgit v0.11.2