
Screen Snapping
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
NOTICE:
-------------
installation via GHNS won't get you the config dialog.
Instead download the file and install it by
plasmapkg -i screenSnapping.kwinscript -t kwinscript
---
This overrides stock screen snapping and snaps to the decoration directly (unlike snap-to-deco which fixes the position after the actual snap and stopping the movement)
In addition, vertical, horizontal, inner and outer snap distance can be configured independently.
giogziro95
3 years ago
1. Snapping to the bottom edge while resizing doesn't work.
2. Snapping to the left edge while resizing doesn't work when part of the window is above or bellow the screen real estate.
3. Same as 2, but for the right edge.
Report
woko1754
5 years ago
I never will understand why they changed the behavior.
Report
thomas12777
5 years ago
We changed the behavior on top of the agreement that the screen edges are valuable (fitt's law) and the deco borders make little use of that value (the only thing you can do with them is to remove the window from that valuable area...) but "steal" them from the decorated client UI (scrollbars, toolbuttons, ...)
That caused a stupid situation for bad luck conditions. Few weeks after the patch, kde-workspace was "frozen" (shifting focus towards KDE 5) and some more weeks later, first reports of unhappy users filed in.
While one would probably not have gone for such rather invasive change, knowing it was "set in stone" (we'd just have added it to KDE5 instead), we neither could act anymore. Calamities *shrug*
We'll likely ultimately either pipe snapping through a script, so one can eg. treat konsole different from kwrite and the left corner different from the right etc. or provide a setting and rules.
Report
jstalnak
6 years ago
Report
davesp
6 years ago
The KDE devs may have forgotten that they can set side borders to zero width if they so highly value their screen real estate. Then they could have spared us this aggravation.
This is the first time I had to install a KWinScript to fix an issue (which shouldn't have been introduced in the first place).
Well done!
Report
spacecase-25
6 years ago
Report
spacecase-25
6 years ago
Report
thomas12777
6 years ago
var area = workspace.clientArea(KWin.WorkArea, workspace.activeScreen, workspace.currentDesktop);
and the algorithm doesn't make differences between inner and outer screen edged.
It also works as expected here.
Can you please post the output of "xrandr -q"?
Report
spacecase-25
6 years ago
Screen 0: minimum 320 x 200, current 3840 x 1200, maximum 16384 x 16384
DFP1 disconnected (normal left inverted right x axis y axis)
DFP2 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 495mm x 310mm
1920x1200 59.95*+
1920x1080 59.95
1600x1200 59.95
1680x1050 59.95
1400x1050 59.95
1280x1024 59.95
1440x900 59.95
1280x960 59.95
1280x800 59.95
1280x768 59.95
1280x720 59.95
1024x768 59.95
800x600 59.95
640x480 59.95
DFP3 connected 1920x1080+1920+0 (normal left inverted right x axis y axis) 444mm x 249mm
1920x1080 59.80*+ 59.94 60.00 59.94
1776x1000 59.94 59.94
1680x1050 59.94 59.80
1400x1050 59.94 59.80
1600x900 59.94
1280x1024 59.94 59.80
1440x900 59.94
1280x960 60.00
1360x768 60.02
1280x768 60.00
1280x720 60.00 59.94
1024x768 60.00
1152x648 59.94
800x600 60.32
720x480 60.00 59.94
640x480 59.94
CRT1 disconnected (normal left inverted right x axis y axis)
Report
thomas12777
6 years ago
Do you have window snapping enabled and/or could there be windows or panels (latter don't require window snapping) that couls impact the behavior?
Report
spacecase-25
6 years ago
Thanks for all your time working this through with me.
Report
thomas12777
6 years ago
Do you get the same for the oxygen decoration?
If not:
what decoration do you use (some aurorae theme I assume) and does it also happen when suspending the compositor (Shift+Alt+F12)?
Report
spacecase-25
6 years ago
http://i.imgur.com/9nR9ZoZ.jpg
Report
thomas12777
6 years ago
Center snapping was disabled but window snapping enabled?
And as result windows would snap to other windows and by this bleed into the other screen?
Was/is the window snapping distance bigger than the screen snapping distance?
(Maybe you could upload a screenshot of the problematic setting and constellation, ie. windows "mis-snapped"?)
Report