Registered Member
|
Hello everyone
I'm currently working on a profesional program, and I need to configure windows for they cannot go over the limit of the desktop (so they will always be visible, whatever move you apply to them). I use Kwin 3 and 4. I know this is not a very common feature, but this is crucial for this program. If someone know how to configure that, don't hesitate ! Thanks Fabien |
KDE Developer
|
I do not really understand what you want to achieve. Could you please elaborate a little bit more?
|
Registered Member
|
i think he meant preventing window border from crossing the screen edge (amiga like).
|
Registered Member
|
Yes, this is it, sir_herrbatka. Sorry if it was a bit confuse...
|
|
Intercept move events of the window(), test the geometry against QDesktopWidget::availableGeometry() and snap it back to that bounds.
If you're developing that application you presumingly want to have that work with all windowmanagers and then have the program do it. Any customized solution (for KWin4: a script; for KWin3: not possible) won't cut it. WMs usually prevent the user from moving windows completely out of sight, but not (all) configure requests and rarely partial crossing. If you want to get near that behavior, but for all windows: kwriteconfig --file kwinrc --group Windows --key BorderSnapZone 10000 kwriteconfig --file kwinrc --group Windows --key SnapOnlyWhenOverlapping true qdbus org.kde.kwin /KWin reconfigure WARNING: ------------- a) this will more or less break quick tiling b) BorderSnapZone is capped by the "kcmshell4 kwinoptions" config dialog. If you ever open it and save settings, the behavior changes back. |
Registered Member
|
Thanks luebking ! That is what I was looking for. I have already thought to use border snapping, but I didn't know the existence of the option SnapOnlyWhenOverlapping
|
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], q.ignora, watchstar