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 243962 - Evolution shouldn't save its main window's size when closing if maximized
Evolution shouldn't save its main window's size when closing if maximized
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: general
unspecified
Other All
: Normal enhancement
: Future
Assigned To: Sven Herzberg
Evolution QA team
: 337755 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-05-30 23:40 UTC by Julien Olivier
Modified: 2008-10-01 09:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed Patch (4.34 KB, patch)
2006-04-26 08:51 UTC, Sven Herzberg
none Details | Review
Updated patch (4.72 KB, patch)
2006-04-26 10:50 UTC, Sven Herzberg
none Details | Review
The final patch (4.95 KB, patch)
2006-04-26 11:52 UTC, Sven Herzberg
none Details | Review
Full patch (5.42 KB, patch)
2006-04-27 08:20 UTC, Sven Herzberg
accepted-commit_now Details | Review

Description Julien Olivier 2003-05-30 23:40:35 UTC
Please fill in this template when reporting a bug, unless you know what you
are doing.
Description of Problem:

If you close Evolution while maximized, it remembers the maximized size.
Thus, when you re-open it, it starts maximized and there is no way to
un-maximize it else than resizing it manually.

Steps to reproduce the problem:
1. Maximize Evolution
2. Close it
3. Re-open it
4. Click on the "un-maximize" button of your window manager (tested on
metacity)

Actual Results:

The window stays maximized.

Expected Results:

The window should have returned to the last non-maximized size it had
before closing.

How often does this happen? 

always

Additional Information:

A lot of apps have this bug. Please, someone, start fixing that !
Comment 1 Gerardo Marin 2003-10-17 18:50:02 UTC
While I agree that it's anoying to resize a maximized window, this is
hardly an Evolution bug, but a window manager issue. Application must
save its size regardless since, yeah, there must be people who like it
maximized.
Comment 2 Julien Olivier 2003-10-17 23:40:13 UTC
No, that's not how it should work. The application should remember the
last unmaximized size AND remember that the app was left maximized.

This way, the next time it starts, it starts miximized but knows at
which size it should fall back when the user un-maximizes it.
Comment 3 Anna Marie Dirks 2003-10-20 17:54:05 UTC
The behavior you suggest, Julo, seems very reasonable to me. Let's try
to get some input from Ettore about the feasability of this solution
(from a implementation perspective). 
Comment 4 André Klapper 2005-11-25 00:41:30 UTC
reassigning jpr's old evolution\miscellaneous bugs to harish
Comment 5 Sven Herzberg 2006-03-27 15:32:01 UTC
Can this be done for GNOME 2.16?
Comment 6 Elijah Newren 2006-04-09 02:07:10 UTC
Duplicate of bug 201362?
Comment 7 Elijah Newren 2006-04-09 02:07:39 UTC
*** Bug 337755 has been marked as a duplicate of this bug. ***
Comment 8 Sven Herzberg 2006-04-26 08:51:11 UTC
Created attachment 64303 [details] [review]
Proposed Patch

Proposing this patch to fix this bug. It introduces this behavior:

When the window gets maximized, store its maximized state in GConf.
When the window gets resized, add a timer to store the current size in GConf (I'm using a timer here to avoid lots of GConf writes while resizing the window for a longer period).
The window doesn't store the size if it's maximized.

When a window gets created, set its default size and maximize it afterwards (if necessary).

This patch needs to be tested (I'm compiling evolution right now), so there might be another version of this patch later.
Comment 9 Sven Herzberg 2006-04-26 10:50:52 UTC
Created attachment 64306 [details] [review]
Updated patch

This patch compiles both with HEAD and 2.6.1
Comment 10 Sven Herzberg 2006-04-26 11:52:35 UTC
Created attachment 64312 [details] [review]
The final patch

This patch compiles cleanly, doesn't throw any runtime warnings and behaves exactly the way I want to.

I consider this patch as a trivial patch, because it fixes a small memory leak (the s/gconf_client_get_default()/gconf_client/ passage) and contains the obvious code to implement this feature.
Comment 11 Daniel Holbach 2006-04-27 07:29:40 UTC
https://launchpad.net/distros/ubuntu/+source/evolution/+bug/34502 and https://launchpad.net/distros/ubuntu/+source/evolution/+bug/41696 discuss the same bug - will this be in 2.14.x?
Comment 12 Sven Herzberg 2006-04-27 08:20:23 UTC
Created attachment 64374 [details] [review]
Full patch

This one also includes the missing gconf schema definition for the new key.

May I commit this to HEAD?
Comment 13 Srinivasa Ragavan 2006-04-28 11:05:00 UTC
Looks good to commit to head and gnome-2-14
Comment 14 Sven Herzberg 2006-04-28 11:21:51 UTC
2006-04-28  Sven Herzberg  <herzi@gnome-de.org>

        reviewed by: Srinivasa Ragavan

        * shell/apps_evolution_shell.schemas.in.in: added boolean key for the
        maximized state of the window
        * shell/e-shell-window.c: added window state saving and updated window
        size saving to work as expected (fixes bug 243962)
Comment 15 Srinivasa Ragavan 2008-10-01 09:34:01 UTC
Sven: Ping [Can we catch up on irc or Can you look at the mail I have sent to you?]