When new windows open on an empty screen, they open at (0,0)/frame position. If they are not maximized in either direction, trying to move them will make them snap at client position, e.g. (-4,0). I understand this is useful for scrollbars etc.
The initial placement could use the same algorithm.
The patch in the review request works fine. I am, however, not sure if the feature is really needed. Let me clarify:
Previously, i.e. without the patch from bug 323504, it was not possible to move a window to a place where it had originally opened, making placement inconsistent. If the patch from bug 323504 is committed, then this inconsistency is gone. In other words, I do no longer need this feature.
As long as I continue to be able to create window rules that force placement at the inner border, e.g. for my editor window, I think automatic placement to inner edges is visually distracting.
I would suggest to collect more opinions before committing. Or make it configurable (which would make it a KF5 matter).
That patch, as it is, cannot go in.
Leaving aside the "weird, osset screen config" concern (makes things more complex, but is fixable) the patch basically breaks snapping.
The purpose of snapping is to easily move the window to a predefined location - no matter which that actually is.
With the patch however, snapping to the desired position (deco/client) becomes an obstacle game - depending on how thin the border is and how much you know about the actual behavior.
Otherwise the window wil judder around clint/deco snap with mouse movements (and for a 1px borde, there's not the least preference on either around the screen edge)
Imo, the screenborders are the most valuable positions and snapping to the decoration (where the only possible action is to remove the decoration from the value position) just wasting it.
If i'm wrong and ppl. prefer visual ensurance that snapping actually worked an the window was not somehow moved too far or whatever, i'd rather suggest to revert to deco snapping, but not break snapping (esp. not as you cannot see to what you snapped since oxygen usually merges content and decoration)
Git commit 6d256b2d149c68fd08888865b8a7fafdad397296 by Thomas Lübking.
Committed on 15/08/2013 at 09:53.
Pushed by luebking into branch 'KDE/4.11'.
align zero corner placement to client, not deco
M +2 -1 kwin/manage.cpp
M +26 -4 kwin/placement.cpp
Sorry, accidental commit.
It makes sense atm, but eventually needs to be reverted with the resolution of bug #323504
(In reply to comment #2)
> If i'm wrong and ppl. prefer visual ensurance that snapping actually worked
> an the window was not somehow moved too far or whatever, i'd rather suggest
> to revert to deco snapping
I would greatly appreciate it if you reverted to deco snapping!
The current snapping in 4.11.1 looks just awfully ugly, as it cuts off a good part of my window menu button, as well as the left window border, if I try to snap a window to the left border. Window borders are an important visual clue to me - if I didn't want screen borders, I would've turned them off entirely.