Bug 133932 - Should be able to move windows without any part of them going off the screen (dynamically resizing as you move)
Summary: Should be able to move windows without any part of them going off the screen ...
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-11 20:58 UTC by Jon
Modified: 2012-04-04 21:18 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon 2006-09-11 20:58:27 UTC
Version:            (using KDE KDE 3.4.2)
Installed from:    Fedora RPMs
OS:                Linux

In every window manager I've ever used (Windows, OS X, KDE), if you move a window out of the way, there's a tendency to move part of it off the screen.  This is fine sometimes, but often you are moving it out of the way so you can still look at it while also looking at another window.

It would be great if you could move a window while holding down some key combination (or moving with an alternate mouse button), and the window would "smoosh" up against the edges of the screen.  Like if you take a window:

.--------Desktop----------.
|                         |
| .==============.        |
| |             ^|        |
| |             ||        |
| |             ||        |
| |             v|        |
| '--------------'        |
|                         |
'-------------------------'

in any normal window manager, and drag it off the screen, a lot is now hidden from view:

.--------Desktop----------.
|                         |
|                         |
|                         |
|                         |
|                .========|:::::.
|                |        |    ^:
|                |        |    ::
|                |        |    ::
'-------------------------'    v:
                 '..............'

Especially the scroll bars, etc.  It makes everything off-screen unreadable.  

You *should* be able to move in an alternative way so that (in this case) the bottom and right borders stop at the edge of the screen and the window resizes dynamically:

.--------Desktop----------.
|                         |
|                         |
|                         |
|                         |
|                .=======.|
|                |      ^||
|                |      v||
|                '-------'|
'-------------------------'

Then all the content in the moved window is still accessible by wrapping and scrolling.

It should remember how big the window originally was as you're positioning it, so the dynamic resize can both increase and decrease the size of the window to keep it against the edge of the screen.  After you let go of the button, maybe it should forget the original size and just stay that size forever, but maybe it should remember, so when you drag it back into the middle of the screen it expands back to its original size:

.--------Desktop----------.
|                         |
|      .==============.   |
|      |             ^|   |
|      |             ||   |
|      |             ||   |
|      |             v|   |
|      '--------------'   |
|                         |
'-------------------------'

Maybe the right and bottom window borders could change style to indicate that they're "remembering" the size the window used to be.
Comment 1 Jon 2006-09-11 21:19:45 UTC
"Maybe the right and bottom window borders could change style to indicate that they're "remembering" the size the window used to be."

... and then you could click them somehow to make them "forget", and then the window would stay that size even if you moved it away from the edge of the screen, getting both functionalities in one.
Comment 2 Jon 2006-09-11 21:30:05 UTC
... and if a window is already partially off-screen in the traditional way, you could push something to bring all the borders inside the screen boundaries as if you had "smoosh-dragged" it there, like a toggle.  

In fact, all windows should really just do this by default.  When do you ever *want* part of the window to be non-visible?
Comment 3 Martin Flöser 2012-04-04 21:01:25 UTC
As of 4.9 you can write custom scripts to adjust the behavior. E.g. you could write a script which gets notified whenever a window movement ends and check whether parts of the window are outside the screen to adjust the size.

For more information about the scripting capabilities please refer to
http://techbase.kde.org/Development/Tutorials/KWin/Scripting and http://techbase.kde.org/Development/Tutorials/KWin/Scripting/API_4.9

Concerning the specific request I don't know if that is a feature which has strong enough request in the user base to be considered. Given that the requested behavior requires a key to be hold would render it a very hidden and very specific feature. To figure out whether the user base is interested in such a behavior we recommend to use http://brainstorm.forum.kde.org

But in general our approach to such custom changes in behavior is to use scripting which means that I set the request to WORKSFORME.
Comment 4 Thomas Lübking 2012-04-04 21:18:03 UTC
@Martin
BeOS / Haiku behavior / feature - usually not done on X11 because resizing is (or used to be) dog slow, so it shouldn't happen unexplicitly, also it's not randomly possible if the window has a minimum size (as usual)

Also it can be quite nasty because the windows trigger sth (resize) when you do sth. else - but i didn't use BeOS that extensively (so maybe matter of habit)