Kwin snapping fix

Eric Froemling ecfroeml at ricore.net
Wed Sep 21 00:32:09 CEST 2005


Hi,
Sorry I don't have a patch, but the change itself is very simple:
In geometry.cpp near the top of Workspace::adjustClientSize:
the old line was:
const QRect maxRect = clientArea(MovementArea, c->rect().center(),
c->desktop());
it needs to be:
const QRect maxRect = clientArea(MovementArea, moveResizeGeom.topLeft()
+ c->rect().center(), c->desktop());

I havn't passed it along to lubos lunak (i'm new here)  but if you'd
like to that'd be great

Thanks much
-Eric

> 
> On Thursday 25 August 2005 18:38, Eric Froemling wrote:
> > I just wanted to pass along a wee little fix I made to kwin in case
> > anyone would be kind enough to test it and/or submit it.  I have dual
> > monitors and I noticed that window resize snapping was not working on
> > the right side of my right monitor, while move-snapping was working
> > fine.  I poked around in the code in kdebase/kwin/geometry.cpp and saw
> > that in adjustClientPosition(), maxRect is set to the client area
> > containing pos+c->rect().center(), while in adjustClientSize it is set
> > based off of just c->rect().center().  So in the adjustClientSize case
> > maxrect was always getting set to the dimensions of my left monitor.  If
> > I change the adjustClientSize version to moveResizeGeom.topLeft() +
> > c->rect().center(), all is well.  (moveResizeGeom.topLeft is what gets
> > passed in as "p" in adjustClientPosition() anyway so its pretty much the
> > same code)
> 
> gah.. i don't know why i didn't reply to this one sooner. do you have
a patch 
> handy? have you passed this on to the kwin matainer (lubos lunak)? if
you do 
> have a patch but haven't sent this to lubos, please send it to me asap
so i 
> can test and commit for 3.5
> 
> -- 
> Aaron J. Seigo
> GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43
> 
> Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)
> 
> 




More information about the kde-quality mailing list