GNOME Bugzilla – Bug 517722
new window expand feature (patch)
Last modified: 2010-01-20 18:55:43 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
Created attachment 105662 [details] expand feature - metacity patch against svn + test code
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
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_*)
Created attachment 105678 [details] [review] expand feature patch I hope this satisfies the guidelines better. See README.windowexpand in patch.
(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?).
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.
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.
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).
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.
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.
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/
Review of attachment 105877 [details] [review]: .