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 677993 - Remember screen used in previous session
Remember screen used in previous session
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Shell
3.4.x (obsolete)
Other Linux
: Normal enhancement
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2012-06-13 09:35 UTC by Milan Crha
Modified: 2012-06-26 14:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
evo patch (1.08 KB, patch)
2012-06-26 14:53 UTC, Milan Crha
committed Details | Review

Description Milan Crha 2012-06-13 09:35:02 UTC
Moving this from a downstream bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=831128

Description of problem:

I am running a 2 monitor setup, and want Evolution to reside on Monitor #1, but it *always* comes up on monitor #2.

Version-Release number of selected component (if applicable): 3.4.1-2.fc17


How reproducible: Always


Steps to Reproduce:
1. (Move Evolution to screen #1)
2. (Close Evolution)
3. Start Evolution
  
Actual results:

Evolution comes up on screen #2

Expected results:

Evolution comes up on screen #1 (the screen where it was last time)
Comment 1 Roman Kennke 2012-06-13 10:58:45 UTC
I am the original reporter of the problem. I believe it did not happen with Evolution 3.2.x, but started happening in Evolution 3.4.x. Please let me know if you need any more information or help.
Comment 2 Matthew Barnes 2012-06-13 11:22:37 UTC
Since we do nothing to choose a screen at startup, I'm marking this as an enhancement request to remember the screen from the previous session.
Comment 3 Roman Kennke 2012-06-13 11:47:31 UTC
I am not sure I agree. Consider the following:
- It worked with previous versions of Evolution.
- I doubt it is the responsibility of each application to remember the screen it's been on.
- Instead, I would suspect it's up to the window manager to decide where to place the screen (unless the application does anything special)
- Other applications work just fine in this respect (in some cases I am almost 100% sure they don't do anything special with respect to screen placement).
- Evolution does not come up on what I would consider a reasonable default, i.e. screen #1, instead it insists to always come up on screen #2 (no other application does that, except those that I explicitely place there).

All those points lead me to think that it must be some strange interaction between Evolution and the window manager (mutter I suppose).
Comment 4 Milan Crha 2012-06-14 07:33:17 UTC
What is stored in dconf-editor under /org/gnome/evolution/shell/window? Maybe the x/y is pointing to the second monitor (out of screen resolution of the first monitor)? Also, do you have the window maximized? I see some operations with window's screen, which are checking width/height of it, but that is supposed to be the screen, which is "assigned" to the window by a window manager.
Comment 5 Roman Kennke 2012-06-14 08:09:17 UTC
Yes, the window is maximized and I tried to reproduce with unmaximized window, and in this case it comes up correctly (i.e. the problem only appears for maximized evolution). I also tried with other maximized apps, and they work correctly, i.e. it's still an evolution related problem.

in the mention dconf I got:
height: 937
maximized: true
width: 1717
x: 0
y: 27

Both my screens have 1920x1080 geometry.
Comment 6 Milan Crha 2012-06-15 09:04:25 UTC
My guess would be, that the window manager didn't place window yet, but as evolution restores window's position and state (maximized), and that in maximized case it peeks window's screen with gtk_window_get_screen(), then this call "assigns" wrong monitor for the window. The test with not using maximized seems prove it.
Comment 7 Milan Crha 2012-06-26 14:53:40 UTC
Created attachment 217299 [details] [review]
evo patch

for evolution;

OK, I found the issue, I caused it when I was making sure the window will be large enough by screen size. What I didn't know is that the screen consists of multiple monitors, thus, when one monitor is placed next to the second, the screen's width is width of the first monitor plus width of the second monitor. The current code (before this patch) sets window's width to whole screen, and the window manager decides to place the window, when maximized, to the second monitor, instead of the first.

With this patch, evolution tests which monitor it was on the last time, and places it there, before it is maximized. There was no issue with unmaximized windows, thus I didn't touch that part of the code.
Comment 8 Milan Crha 2012-06-26 14:56:14 UTC
Created commit 5f0c512 in evo master (3.5.4+)
Created commit bfcf55a in evo gnome-3-4 (3.4.4+)