Community
Participate
Working Groups
If you have multiple displays, and position an Eclipse window on the second display, the position will not be remembered when you restart Eclipse. All windows will appear on the primary display. Note: If the second display *does not exist* when you restart, then it is, of course, desired behaviour.
Simon, I'm not sure I understand your problem. Are you running in an environment with dual terminals? Which build are you using?
In Windows XP (and W2K for that matter) you can have multiple displays attached and having the desktop stretch over all of them (e.g I have the internal display of my laptop plus a monitor on the side giving me a desktop of 2800x1050). You can place Eclipse windows on the secondary displays, but if you do and quit and restart Eclipse, the window position will not be remembered for any window on a secondary display. On the other hand, if you before you restart Eclipse detach the secondary display, you want all the windows to appear on the primary display (not outside the display). I'm using Eclipse 2.1.
Simon, Can you tell me what your configuration is (with respect to the dual terminal stuff). I am testing this on the following: Windows XP Pro 2 Video cards (Not dual head) Rage 128 PRO (ATI Xpert 128) Intel 82845G/GL Graphics Controller (Onboard Video)
WXP Pro on a Dell Latitude C800 with an ATI Mobility M4 driving the builtin screen and an external monitor.
Simon: What happens when you: - start Eclipse (if more than one window open, close the other ones - so that you only have one Eclipse window on your primary monitor) - Menu Window > new Window. Move this second Eclipse window to your 2nd monitor - Exit Eclipse (Menu File > Exit from the Eclipse window on the primary monitor) - Restart Eclipse. Do you get both Eclipse windows in the primary monitor or not?
Simon, Have you been able to try out the things Christophe suggested?
Ah! If the second window is maximized (before exiting) it will be restored to the primary screen. If it is not maximized it will be restored to the secondary screen. Of course, maximizing the Eclipse windows seems pretty natural, so...
Simon: so is the problem restricted to maximized windows? Debbie: On Windows, a Shell is maximized into the monitor which contains most of this Shell. It looks as if Eclipse does not store the location of a maximized Shell - it just stores the 'maximized' state, which causes the OS to maximize it on the primary monitor. Can someone in the Eclipse UI team confirm this? If that's true, a fix would be to also store the position of a maximized Shell.
Yes.
*** Bug 38696 has been marked as a duplicate of this bug. ***
The workbench only remembers that the window was maximized on shutdown. It does not remember the location in that case. I tried saving and restoring the bounds of the window when maximized and that fixed the problem reported. However, the bounds saved are the bounds of the shell in maximized state, not in normal state. So when you unmaximize after shutdown and startup cycle, the window still occupies the entire monitor screen. There is no support in SWT to get the size of the shell in normal state when maximized/minimized. SWT suggested we listen for resize events and keep track of the window size ourself. We should ignore possible resize callbacks if the shell is maximized/minimized (some OS simply set the shell size to the monitor screen size when requested to maximize a shell). We should also, when restoring windows, ensure that they intersect with the current virtual screen bounds (Display.getBounds()). Otherwise, if you run on a machine with dual monitors and a window in placed in the 2nd monitor, that location is saved. If you start that same workspace on another machine (workspace maybe on a network which you can access from different machines), that only has one monitor, the windows on the second monitor will not be visible. If a saved window's bound is outside the virtual screen bounds, it should be changed to be inside the bounds. We should also consider what to do in the minimized case also. See bug 11509 for more information.
Fix workbench window to remember the shell's bounds in normal state and to restore these on startup. Also guards against a shell's bounds being outside the display's bounds (i.e would not be visible to the user).