Bug 517722 - new window expand feature (patch)
new window expand feature (patch)
Status: RESOLVED WONTFIX
Product: metacity
Classification: Other
Component: general
trunk
Other All
: Normal enhancement
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-02-20 18:34 UTC by dietrich
Modified: 2010-01-20 18:55 UTC (History)
7 users (show)

See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
expand feature - metacity patch against svn + test code (19.50 KB, application/x-gtar)
2008-02-20 18:39 UTC, dietrich
  Details
expand feature patch (34.94 KB, patch)
2008-02-21 02:15 UTC, dietrich
rejected Details | Diff | Review
expand feature patch (35.24 KB, patch)
2008-02-24 22:32 UTC, dietrich
rejected Details | Diff | Review
patch to update src/metacity.schemas.in to ship expand key (798 bytes, patch)
2008-02-24 23:51 UTC, Christopher Roy Bratusek
none Details | Diff | Review
patch against 2.23.5/rev3663 (35.74 KB, patch)
2008-03-25 21:44 UTC, Christopher Roy Bratusek
none Details | Diff | Review

Description dietrich 2008-02-20 18:34:26 UTC
This code intends to add a new "expand" feature to the metacity window manager,
which  enables you to automatically enlarge a window as much as possible,
without covering additional area of other windows: If there is free area along
a complete side of a window, you can simply focus the window and press the
configurable "expand" key (e.g. Win+E), and the window will be resized.


Other information:
I hope I can add an attachment. If not, get it here:
http://people.freenet.de/d-rothe/tmp/metacity-windowexpand-20080220.tgz
Comment 1 dietrich 2008-02-20 18:39:08 UTC
Created attachment 105662 [details]
expand feature - metacity patch against svn + test code
Comment 2 Thomas Thurman 2008-02-20 18:51:35 UTC
Hi! Thanks for your submission. Could you please submit it in the standard patch format? Instructions for doing so are here:

http://live.gnome.org/GnomeLove/SubmittingPatches
Comment 3 Elijah Newren 2008-02-21 02:14:17 UTC
Looks cool...it seems that this could be done as an add-on using libwnck?  We have several variations on themes like this[1], and it'd be nice to keep metacity simple and add-ons powerful and configurable using libwnck.

[1] See bug 118598, bug 151842, the move_to_side_[nwse] gconf keys, the move_to_corner_* gconf keys, Mikkel's recent blog post, and I'm sure a bunch of other places I'm not seeing right now.  I think all of these would probably be better placed in libwnck-powered utilities than in Metacity.  Just a thought...  (someone less lazy than me should probably link all these bug reports together, including digging up the old ones about move_to_side_* & move_to_corner_*)
Comment 4 dietrich 2008-02-21 02:15:27 UTC
Created attachment 105678 [details] [review]
expand feature patch

I hope this satisfies the guidelines better. See README.windowexpand in patch.
Comment 5 dietrich 2008-02-21 02:33:12 UTC
(In reply to comment #3)
> Looks cool...it seems that this could be done as an add-on using libwnck?  We
> have several variations on themes like this[1], and it'd be nice to keep
> metacity simple and add-ons powerful and configurable using libwnck.
> 
> [1] See bug 118598, bug 151842, the move_to_side_[nwse] gconf keys, the
> move_to_corner_* gconf keys, Mikkel's recent blog post, and I'm sure a bunch of
> other places I'm not seeing right now.  I think all of these would probably be
> better placed in libwnck-powered utilities than in Metacity.  Just a thought...

Well, if I had know theren already exists such a thing, I certainly would'nt have bothered doing this myself. In fact, I was quite astonished that I didn't find a request for this feature - maybe I just didn't search long enough.

I believe the number of times auto-resizing features requests/patches like this come up is a clear hint that you should accept these patches and _not_ let people rely on external add-ons (did you ever encounter a non-windowmanager-geek person who had some windowmanager add-ons running?).
Comment 6 Elijah Newren 2008-02-22 02:50:33 UTC
It would be if all the requests were the same...but they all have different types of resize requests.  It may make sense to provide one or two of them, but no way would it make sense to include all.

As to which to include...I think we'd need to try it out.  By making a separate standalone tool, probably with all kinds of different options.
Comment 7 dietrich 2008-02-24 22:32:48 UTC
Created attachment 105877 [details] [review]
expand feature patch

I found out the problem with gimp disappears, if I 
change the user_op flag to TRUE:

in meta_window_expand(...):
meta_window_move_resize (window, TRUE, target.x, target.y, target.width, target.height);

However I don't exactly know what this flag means.
Comment 8 Christopher Roy Bratusek 2008-02-24 23:51:35 UTC
Created attachment 105882 [details] [review]
patch to update src/metacity.schemas.in to ship expand key

I just tried that patch above with rev3595/2.23.0. And I like it. (and have been waiting for an expand feature in mcity).
Comment 9 Mikkel Kamstrup Erlandsen 2008-02-28 09:07:35 UTC
In response to Elijah's comment 6:

I actually have a tool for this. It is very easy to add new "actions" to it. However I am kinda blocking on bug 518606 "get/set_geometry does not set correct window size".

I have a bzr repo at: http://grillbar.org/winwrangler, but it is very rough and sketchy for now, caveat emptor.
Comment 10 Christopher Roy Bratusek 2008-03-25 21:44:03 UTC
Created attachment 108023 [details] [review]
patch against 2.23.5/rev3663

Just an update because of the display/the_display change, so that the patch applies again. And my previous patch for shipping the expand gconf-key is now merged into this one.
Comment 11 Thomas Thurman 2010-01-20 18:14:39 UTC
Review of attachment 105678 [details] [review]:

(Belated) thanks for the patch; I would rather do this in an external script.  Every new piece of code we add to Metacity will have to be maintained, and for a rare case like this which is entirely solvable using the EWMH, it doesn't seem worthwhile to have it in the main tree.  I've written up my thoughts on the matter at
http://blogs.gnome.org/metacity/2010/01/20/expansion-and-external-tools/
Comment 12 Thomas Thurman 2010-01-20 18:14:49 UTC
Review of attachment 105877 [details] [review]:

.

Note You need to log in before you can comment on or make changes to this bug.