GNOME Bugzilla – Bug 650348
Window unmaximizes when a document is closed
Last modified: 2011-08-09 18:28:16 UTC
Steps to reproduce: Using Ubuntu Natty 11.04 with Unity desktop. Have multiple GIMP xcf files open. GIMP running in Single Window Mode. GIMP running in fullscreen. (menus are in the top bar as they should) Close one of the documents. GIMP window is not fullscreen anymore.
Or open one image. Its a known issue. I maintain a personal oneoff patch for this commenting out the line causing the un-maximize. Its VERY annoying. Martin tells me it will be fixed along with the rest of the SWM. Until then I'm including the patch. diff --git a/app/display/gimpimagewindow.c b/app/display/gimpimagewindow.c index 30ff966..63b4f23 100644 --- a/app/display/gimpimagewindow.c +++ b/app/display/gimpimagewindow.c @@ -1365,7 +1365,7 @@ gimp_image_window_session_apply (GimpImageWindow *window, entry_id, GTK_WIDGET (window)); - gtk_window_unmaximize (GTK_WINDOW (window)); + //gtk_window_unmaximize (GTK_WINDOW (window)); gtk_window_resize (GTK_WINDOW (window), width, height); }
Sweet! Thanks for that. I'm personally only running a pre-built PPA version of 2.7.3 because I was eager to get my hands on the single window mode. Unity does not play nice with GIMP since it has 3 windows. The Unity Dock shows it's face if set to "dodge active window" and that main GIMP window is focused, hence hiding any toolbars lying underneath. http://i.imgur.com/eXNnI.png && http://www.reddit.com/r/Ubuntu/comments/h3144/using_gimp_in_unity/
We need to fix this for 2.8, shouldn't be that hard
It should be as easy as removing that un-maximize or moving it to window creation and out of the code that executes on image open. I believe its reason for existing is so that window size changes would apply even if the window is maximized. I personally believe that if the user has maximized something it should stay so until the user un-maximizes. I have always found the un-maximize behavior very very annoying.
commit b9ccf189b49ac2a272c00ee038df7da8a287213a Author: Martin Nordholts <martinn@src.gnome.org> Date: Tue Aug 9 20:23:51 2011 +0200 Bug 650348 - Window unmaximizes when a document is closed Refactor GimpImageWindow session management. As far as session management goes, there are four states and four transitions that are interesting. The states are: State Window mode Images opened ------------------------------------------ s1 swm 0 s2 swm >0 s3 mwm 0 s4 mwm >0 The transitions are: Transition Description ------------------------------------------- t1 Enter single-window mode (swm) t2 Enter multi-window mwm (mwm) t3 Open an image t4 Close an image When thinking of it like this, it is pretty easy to see when to call gimp_image_window_session_clear() and when to call gimp_image_window_session_apply(). So kill gimp_image_window_set_entry_id() and handle all transitions in gimp_image_window_session_update().