From aa98f268bc8f03bfc4f8ad64fd90d2bca707e3c2 Mon Sep 17 00:00:00 2001 From: Dominik Haumann Date: Fri, 25 Jun 2004 20:26:15 +0000 Subject: [PATCH] Fix: snap on resize snapped by 1px wrong on the right and bottom. Now it works perfectly with all client windows including the desktop. CCMAIL: 45805@bugs.kde.org svn path=/trunk/kdebase/kwin/; revision=323630 --- geometry.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index 5d0fcb35df..3278cd8098 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -384,9 +384,9 @@ QRect Workspace::adjustClientSize( Client* c, QRect moveResizeGeom, int mode ) const QRect maxRect = clientArea(MovementArea, c->rect().center(), c->desktop()); const int xmin = maxRect.left(); - const int xmax = maxRect.right()+1; //desk size + const int xmax = maxRect.right(); //desk size const int ymin = maxRect.top(); - const int ymax = maxRect.bottom()+1; + const int ymax = maxRect.bottom(); const int cx(moveResizeGeom.left()); const int cy(moveResizeGeom.top()); @@ -485,10 +485,10 @@ QRect Workspace::adjustClientSize( Client* c, QRect moveResizeGeom, int mode ) !(*l)->isMinimized() && (*l) != c ) { - lx = (*l)->x(); - ly = (*l)->y(); - lrx = lx + (*l)->width(); - lry = ly + (*l)->height(); + lx = (*l)->x()-1; + ly = (*l)->y()-1; + lrx =(*l)->x() + (*l)->width(); + lry =(*l)->y() + (*l)->height(); #define WITHIN_HEIGHT ((( newcy <= lry ) && ( newcy >= ly )) || \ (( newry >= ly ) && ( newry <= lry )) || \