Bug 279774

Summary: Snapping on Screen corner makes windows overlap eachother by one pixel
Product: [Plasma] kwin Reporter: Johannes Schmidt <schmidtjoh>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Johannes Schmidt 2011-08-10 00:52:03 UTC
Version:           unspecified (using KDE 4.7.0) 
OS:                Linux

At first I thought the issue was similar to my other bug 264892, but it must be unrelated because this bug is independet from the panel width. I tested both vertical and horizontal panels.

That is annoying because it is causing the "shuffle" animation (dont know what its called in english in german its "nach hinten rutschen".

I am sorry if this has already reported, but I didnt really know for what terms to search.

Reproducible: Always

Steps to Reproduce:
-snap a window to the bottom right (or any other) corner
-snap a window to the top right corner
OR snap a window to the left edge.

Two "edge snapped" windows do align perfectly.

Actual Results:  
the "quarter snapped" windows are one pixel too high AND wide and overlap eachother.


Expected Results:  
the windows align perfectly and have no overlaping pixels.
Comment 1 Thomas Lübking 2011-08-10 22:09:05 UTC
https://git.reviewboard.kde.org/r/102292/
Comment 2 Thomas Lübking 2011-08-11 12:20:08 UTC
Git commit 561dac0ae1bd158563e4aa6d0f25268fbc5a97af by Thomas Lübking.
Committed on 10/08/2011 at 23:54.
Pushed by luebking into branch 'KDE/4.7'.

QRect::right() + 1 == QRect::x() + QRect::width()

Also to catch inner split for sure the calculation needs to be accurate.

BUG: 279774
REVIEW: 102292

M  +4    -4    kwin/geometry.cpp

http://commits.kde.org/kde-workspace/561dac0ae1bd158563e4aa6d0f25268fbc5a97af
Comment 3 Thomas Lübking 2011-08-11 13:08:36 UTC
Git commit 8a3c0dc3e2523405ca33135d1b0af4f7dbbbefc7 by Thomas Lübking.
Committed on 10/08/2011 at 23:54.
Pushed by luebking into branch 'master'.

QRect::right() + 1 == QRect::x() + QRect::width()

Also to catch inner split for sure the calculation needs to be accurate.

BUG: 279774
REVIEW: 102292
(cherry picked from commit 561dac0ae1bd158563e4aa6d0f25268fbc5a97af)

M  +4    -4    kwin/geometry.cpp

http://commits.kde.org/kde-workspace/8a3c0dc3e2523405ca33135d1b0af4f7dbbbefc7