GNOME Bugzilla – Bug 439749
[patch] add maximize horizontally and vertically to double click on title bar actions
Last modified: 2008-03-01 14:42:07 UTC
Keyboard shortcuts exist for maximizing a window vertically and horizontally. This patch provides 2 new values for the /apps/metacity/general/action_double_click_titlebar gconf key: "toggle_maximize_horiz" and "toggle_maximize_vert". The "toggle_maximize_vert" value causes the window to be maximized vertically when the title bar is double clicked. Similarly, the "toggle_maximize_horiz" value causes the window to be maximized horizontally when the title bar is double clicked. I have not patched control-center, but that should be easy as well if this is accepted. This is my first patch, so let me know if I did anything wrong...
Created attachment 88449 [details] [review] add maximize horizontally and vertically to double click on title bar actions
Created attachment 88450 [details] [review] I noticed I had tabs instead of spaces in the gconf description. Changed tabs to spaces.
Created attachment 88451 [details] [review] forgot to save core.h before running diff ok, maybe I should sit on patches a little longer from now on before submitting them :)
Just a reminder to have a look at this patch. Thanks
Jason: Sorry to be so long getting back to you. The patch looks good (but I haven't run it yet), but I'm interested to know why you think it would be useful to be able to do this. Do you have a need to?
This person says he'd like vertical maximise on double-click titlebar, fwiw: http://blogs.gnome.org/metacity/2007/12/12/2007-12-11-just-a-quick-roundup/#comments
I miss that feature. I became addicted to it in the nineties on pre-CDE versions of Solaris. However, I fully understand the reluctance to add more settings to Metacity. With increasingly large screens, the correct solution might be more dialog between Metacity and the application, and to redefine "Maximize" to take the natural size of the document/window contents into consideration. For example, clicking maximize on an Evince window would cause Metacity to ask Evince how large a window it would need to display the current document (given screen size constraints), and Metacity would then resize the Evince window to that size. I believe the Macintosh used to have a system like this (maybe it still does? I haven't used a Macintosh in more than ten years).
My main use for the feature is when reading a document with illustrations or images. I do not want to maximize in both directions because reading long lines is tiresome but I want to expand vertically so that I can view a full illustration without scrolling. I never use the horizontal maximization, but added that option as well since it already existed for the keyboard shortcuts. The patch is stale now, I'll upload an updated version in a bit.
Created attachment 101007 [details] [review] add maximize horizontally and vertically to double click on title bar actions (against revision 3476)
Jason: Hey, thanks for updating the patch! Markus: There is actually a way for windows to hint to the WM they don't want to be wider than a certain width. I have an idea that the reason this doesn't actually happen in practice is that programs just don't do it, rather than that we don't support it (since I'm sure we do, and I've worked with the code that supports it). I will ask the evince people if you like and find out. I imagine that even though you can do width constraint with full maximisation, it won't obviate your desire for vertical maximisation because a lot of programs don't set it.
Created attachment 106322 [details] [review] Updated Patch (for v2.23.1/rev3616) I like the Idea. I can't develop in C, so a review is recommended. I took the old patch and just updated it, so everything should be ok.
Created attachment 106323 [details] [review] Fixed patch for common.h there has a line beeing added to common.h, that shouldn't be added.
This turns out to be a duplicate... moving discussion over there. *** This bug has been marked as a duplicate of 358674 ***