GNOME Bugzilla – Bug 660475
"Windowed Mode" doesn't remember maximize state
Last modified: 2018-05-24 13:03:17 UTC
Using the new "Windowed Mode", I exit GIMP with the window maximized. Upon the next startup, the window retains the previous size, but is not maximized and located roughly 25px from the top of the monitor.
Not supported yet. Planned for 2.10
Or later.
Do we leave this ticket open or close it then?
Keep it open, the problem exists.
Created attachment 211254 [details] [review] [PATCH] app: Save the maximized state of the main window in the sessionrc file. This bothered me a lot, so I wrote a patch. I also looked at doing this more generally from gimpsessioninfo, but since there's no nice way to retrieve the maximized state of an arbitrary window, I did it specifically for gimpimagewindow. (I don't really see many people maximizing toolbox windows anyway, so it's no huge loss.)
Some people maximize the toolbox Window to get a toolbar-like view of the tool icons, but that is arguably an uncommon usage.
After a quick look on the patch, it looks reasonable. However, this is an area in which it is easy to break something when fixing something else. It would help a lot if you also provided a test case in app/tests/test-ui,c. Writing test cases for fixes in this area will make it possible to improve and refactor this code. Without test cases, it will be hell, because it will be too much work to verify that a change did not break anything.
Created attachment 211429 [details] [review] Added a testcase.
Created attachment 211430 [details] [review] Patch with testcase & fixed variable names. I forgot to change my variable names to be consistent w/ the coding style for the last patch. This one should be better.
*** Bug 675528 has been marked as a duplicate of this bug. ***
*** Bug 676666 has been marked as a duplicate of this bug. ***
Looks good to me, pushed to master. After some testing, I think it's safe to merge to 2-8. commit 89760cf044a9aed9b05dfb3f9e6d1da8449018d2 Author: Michael Henning <mikehenning@eclipse.net> Date: Tue Apr 3 20:59:37 2012 -0400 app: Save the maximized state of the main window in the sessionrc file. app/display/gimpimagewindow.c | 33 +++++++++++++++++-- app/display/gimpimagewindow.h | 1 + app/tests/gimpdir/sessionrc-2-8-single-window | 3 +- app/tests/gimpdir/sessionrc-expected-single-window | 3 +- app/tests/test-ui.c | 62 +++++++++++++++++++++++++++++++++++ 5 files changed, 98 insertions(+), 4 deletions(-)
One question: why is this only applied in single-window-mode? There is imo no reason not to save the state of the empty image window in multi-window-mode.
Created attachment 215103 [details] [review] [PATCH] app: Save maximize state of image window in multi-window-mode too. I forget exactly why I did that. In multi window mode, if you maximize the new image window, make a new file, and then close the file, the new image window isn't maximized any more, which might have given me the impression that the new image window isn't meant to be maximized or something. Now that I think about it more, I suppose that's a bug. Well, anyway, this patch makes it save the maximized state in multi-window mode too, but because of that bug I just mentioned, the patch is ineffective unless our users don't open or create any images. I imagine that most of the GIMP's users open or create images while using program. The rest of the users just open the program so that wilber can creepily stare at them while they work (That's probably just you, mitch).
Yeah, I shall make his eyes glow :P
drawoc? What about this patch?
Is there a reason why this hasn't been applied yet?
Comment on attachment 211430 [details] [review] Patch with testcase & fixed variable names. Doesn't apply cleanly anymore
Comment on attachment 215103 [details] [review] [PATCH] app: Save maximize state of image window in multi-window-mode too. Has to be checked once the first attachment applies again
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/379.