Kwin snapping fix
Eric Froemling
ecfroeml at ricore.net
Fri Aug 26 02:38:21 CEST 2005
Hi all,
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)
Thanks
-Eric
More information about the kde-quality
mailing list