After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 650348 - Window unmaximizes when a document is closed
Window unmaximizes when a document is closed
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
git master
Other All
: High normal
: 2.8
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2011-05-16 20:18 UTC by Alexis Morin
Modified: 2011-08-09 18:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alexis Morin 2011-05-16 20:18:17 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.
Comment 1 Alexia Death 2011-05-16 20:39:30 UTC
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);
 }
Comment 2 Alexis Morin 2011-05-16 20:49:39 UTC
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/
Comment 3 Martin Nordholts 2011-05-17 04:49:32 UTC
We need to fix this for 2.8, shouldn't be that hard
Comment 4 Alexia Death 2011-05-17 05:40:26 UTC
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.
Comment 5 Martin Nordholts 2011-08-09 18:28:16 UTC
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().