Bug 365353 - kscreen snaps to top of monitors, prevents alignment to bottom of each screen
Summary: kscreen snaps to top of monitors, prevents alignment to bottom of each screen
Status: RESOLVED FIXED
Alias: None
Product: KScreen
Classification: Plasma
Component: kcm (show other bugs)
Version: 5.6.5
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Kügler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-11 12:25 UTC by Paul Fee
Modified: 2016-08-16 22:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.7.4
Sentry Crash Report:


Attachments
json configuration file reproducing this bug (6.59 KB, application/json)
2016-08-16 21:46 UTC, Sebastian Kügler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Fee 2016-07-11 12:25:01 UTC
I have three monitors, their resolutions are:
1. 1920x1080
2. 1920x1200
3. 1920x1080

I want to use "kcmshell5 kscreen" to arrange the monitors so that the lower edge of each monitor is aligned.  The resulting positions (as reported by xrandr) would therefore be:

1. 1920x1080+0+120
2. 1920x1200+1920+0
3. 1920x1080+3840+120

I can't achieve this using the KDE screen configuration GUI as the top of each screen is used for snapping.  This usually makes aligned easy.  However when I drag the middle screen close to the intended position, it gets snapped to the wrong position.  It seems like the top of each monitor produces a snap line, but the bottom does not.

I has to use the xrandr command to get the arrangement I desired:
$ xrandr --output DP-2 --pos 1920x-120

Reproducible: Always
Comment 1 Bernhard Scheirle 2016-08-15 22:40:00 UTC
I'm also affected by this bug.

And thanks for the xrandr command workaround.
Comment 2 Sebastian Kügler 2016-08-16 21:46:12 UTC
Created attachment 100639 [details]
json configuration file reproducing this bug

can be run from libkscreen's build directory, using the kwaylandtestserver.
Comment 3 Sebastian Kügler 2016-08-16 21:46:50 UTC
Thanks for the bug report!

I've reproduced the problem by creating a wayland server with a configuration similar to what you describe to test the systemsettings' module's ui.

It seems that there's a bug in the snapping code. I'll see if I can come up with a fix for this. 

For reference, I've attached the broken config as json file to this bug report.
Comment 4 Sebastian Kügler 2016-08-16 22:45:32 UTC
Git commit 8448070a7dc55b6719d845c4333fe9c5a35991e0 by Sebastian Kügler.
Committed on 16/08/2016 at 22:40.
Pushed by sebas into branch 'master'.

[kcm] decrease snapping area

Displays with only a small difference in size need a smaller amount of
snapping, so the user can still choose wether to top or bottom align.

This especially makes aligning monitors with 1920x1080 and 1920x1200
work.

M  +1    -1    kcm/src/declarative/qmloutput.cpp

http://commits.kde.org/kscreen/8448070a7dc55b6719d845c4333fe9c5a35991e0
Comment 5 Sebastian Kügler 2016-08-16 22:48:47 UTC
Git commit bdaa4258090782982364ac70ac83c4035272891a by Sebastian Kügler.
Committed on 16/08/2016 at 22:48.
Pushed by sebas into branch 'Plasma/5.7'.

[kcm] decrease snapping area

Displays with only a small difference in size need a smaller amount of
snapping, so the user can still choose wether to top or bottom align.

This especially makes aligning monitors with 1920x1080 and 1920x1200
work.

M  +1    -1    kcm/src/declarative/qmloutput.cpp

http://commits.kde.org/kscreen/bdaa4258090782982364ac70ac83c4035272891a