Bug 264892 - one pixel line on the right screen edge after "snaping" the window.
Summary: one pixel line on the right screen edge after "snaping" the window.
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-30 21:32 UTC by Johannes Schmidt
Modified: 2011-08-08 20:10 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Image of the one pixel line next to a "snapped" dolphin window (26.60 KB, image/png)
2011-01-30 21:32 UTC, Johannes Schmidt
Details
Another screenshot where the bug is visible before resizing (206.37 KB, image/png)
2011-01-30 22:53 UTC, Johannes Schmidt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Schmidt 2011-01-30 21:32:16 UTC
Created attachment 56676 [details]
Image of the one pixel line next to a "snapped" dolphin window

Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

When I half-maximize (or since kde 4.6 quarter-maximize) a window to the right half of the screen it leaves a one pixel line of the desktop visible (see screenshot). If I resize the window manually it snaps into place.

Reproducible: Always

Steps to Reproduce:
resize a window by drawing it to the right screen edge.

Actual Results:  
Window covering almost all of the right screen but leaving a one pixel line of the desktop visible.

Expected Results:  
Window covering 100% of the right screen half

I am using release kde-sc-4.6.0 with nvidia-drivers
My taskbar is vertical on the left screen edge (telling you this because vertical taskbars allways had a few bugs in kde due to being a non-default setup)

I hope this hasn't been filed so far, but due to the nature of the issue and the problem of naming such abstract features ("snaping" "maximizing") I am not sure. Forgive me if I wasted your precious KDE Dev time with this and thus keeping you from improving our beloved window manager. ;-)
Comment 1 Martin Flöser 2011-01-30 21:38:33 UTC
Looks fine here. What window decoration are you using? If it's not the default 
one, please try the default (Oxygen)
Comment 2 Johannes Schmidt 2011-01-30 22:16:01 UTC
It is the default oxygen window decoration. Unfortunately in the screenshot it uses the flat style because I went to a directory which had the name of a gtk application I had on my exeption list for flat design.

Oh, and of course at the moment I have glow and shadows disabled so it might look a bit defferent because of that.

Here is what I tried to stop the bug reproducing:
-Restarted X
-Different Windows
-different profile (renamed ~/.kde)
No effect from any of those.

If you have any more questions or things for me to try out, just tell me what to do.
Comment 3 Thomas Lübking 2011-01-30 22:33:12 UTC
Doesn't happen here either - do you have two or more displays?
Comment 4 Johannes Schmidt 2011-01-30 22:53:11 UTC
No, I have (yet) only one display, only one virtual desktop (i know it's a useful feature but atm I don't need it).

My screen resolution is 1920x1080.

I made another screenshot where you can see, that even the border before resizing is one pixel away from the screen edge.
Comment 5 Johannes Schmidt 2011-01-30 22:53:54 UTC
Created attachment 56677 [details]
Another screenshot where the bug is visible before resizing
Comment 6 Thomas Lübking 2011-01-30 23:08:43 UTC
is it only on the right side of the screen?
neither on bottom or left?
Comment 7 Johannes Schmidt 2011-01-30 23:16:16 UTC
Only happens on the right side. Even the left side (where my panel lives) is fine.

If I resize two windows, one to the left and one to the right, the left one is fine, it goes from the panel to the middle accurately. The right window goes from the middle, where it is directly connecting to the other window to the right where it keeps one pixel distance from the screen edge. All other edges are fine as well. Fullscreen using "draw window to top edge"-resizing works fine as well.
Comment 8 Martin Flöser 2011-01-31 07:05:54 UTC
I tested yesterday on the right edge. Could you please do some tests with the window decoration? Switch to a different one or use the default settings. Just to rule out that it's a bug in Oxygen.
Comment 9 Johannes Schmidt 2011-01-31 09:01:16 UTC
I tested bespin, aurorae and plastik and the bug occures with any of them.
Comment 10 Johannes Schmidt 2011-01-31 09:09:28 UTC
I just tried an empty profile again without making any settings in it and it worked, so I began restoring my custom settings step by step.

After I moved my plasma panel to the left screen edge (vertical Position) the problem started occuring.

My professional diagnosis (wild guess) is, that the plasma bar changed how it reports its width in 4.6.0 and kwin missplaces things.

Updated Steps to Reproduce:
-new kde profile
-move default panel to the left screen edge (vertical)
-scale window by moving it to the right screen edge

It happens with any theme, decoration, plasma theme and widgets in the panel (tried a fully empty panel too).
Comment 11 Thomas Lübking 2011-02-01 16:57:29 UTC
it's probably rather about the odd/even width of the panel:
geometry.cpp:~3503
case QuickTileRight:
{
   QRect max = workspace()->clientArea( MaximizeArea, whichScreen, desktop() );
    setGeometry( QRect( max.x() + max.width()/2, max.y(), max.width()/2, max.height() ) );
    break;
}

DIV math error: w/2+w/2 != w | w = 2*n+1
    setGeometry( QRect( max.x() + max.width()/2, max.y(), max.width()-max.width()/2, max.height() ) );
applies to all modes, but is only notable for right/bottom
Comment 12 Johannes Schmidt 2011-02-02 14:26:33 UTC
That makes sense. If I reduce my panel by one pixel the issue disappears, by one pixel more and it appears again.

Thanks for looking into it. Vertical taskbar users all over the vast kde user base will thank you and name their children after you. ^^
Comment 13 Johannes Schmidt 2011-08-08 20:10:29 UTC
Seems like this is fixed since 4.7.0