Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 19824 - Needed multi-monitor methods.
Summary: Needed multi-monitor methods.
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Christophe Cornu CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 7232 20223 22224 26895 30386 30387 (view as bug list)
Depends on:
Blocks: 10975 20223 22724 32366
  Show dependency tree
 
Reported: 2002-06-10 14:00 EDT by Rob Hughes CLA
Modified: 2003-05-01 14:39 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Hughes CLA 2002-06-10 14:00:29 EDT
A programmer needs the following support in SWT in order to be able to program 
for multi-monitors correctly.

1. A way to determine the bounds/client area of the monitor the application is 
primarily running on.  In a win32 env his can be accomplished using the api 
MonitorFromWindow().  Alternatively, SWT could provide a way to get the bounds 
of a specific monitor.  That would also include being able to get all the 
monitors connected to the system and also determining which one is the primary.

2. A way to determine the bounds/client area of a monitor based on a specific 
point.  In a win32 env his can be accomplished using the api MonitorFromPoint
().

3. A way to determine the virtual bounds/client area of all connected monitors 
on the system.  This is currently how Display.getBounds() works, but should 
probably be renamed to something like Display.getVirtualBounds() for clarity.  
The current Display.getClientArea() does not work properly as it doesn't 
account for task bars and such.
Comment 1 Mike Wilson CLA 2002-06-10 14:36:17 EDT
Any solution we come up with needs to be implementable on at least win32, 
linux and macosx, since multi-moniter setups are common for all these 
platforms.
Comment 2 Mike Wilson CLA 2002-06-10 14:36:34 EDT
Defer until post R2.0.
Comment 3 Steve Northover CLA 2002-08-22 11:20:37 EDT
We need to look at this again, if not for 2.1 then 3.0.
Comment 4 Steve Northover CLA 2003-01-28 18:21:59 EST
*** Bug 22224 has been marked as a duplicate of this bug. ***
Comment 5 Steve Northover CLA 2003-01-28 18:22:08 EST
*** Bug 30386 has been marked as a duplicate of this bug. ***
Comment 6 Steve Northover CLA 2003-01-28 18:23:00 EST
Chrix is working on this.
Comment 7 Steve Northover CLA 2003-01-28 18:24:10 EST
*** Bug 26895 has been marked as a duplicate of this bug. ***
Comment 8 Steve Northover CLA 2003-01-29 15:13:05 EST
*** Bug 30387 has been marked as a duplicate of this bug. ***
Comment 9 Steve Northover CLA 2003-02-13 11:23:06 EST
*** Bug 7232 has been marked as a duplicate of this bug. ***
Comment 10 Steve Northover CLA 2003-02-13 11:23:23 EST
*** Bug 20223 has been marked as a duplicate of this bug. ***
Comment 11 Christophe Cornu CLA 2003-02-13 11:24:11 EST
I have investigated support for multi monitor support. This won't make it in 
Eclipse 2.1.  Outstanding issues:

- we require GTK 2.2.  There is no API in earlier GTK versions
- there is no prototype yet for Mac and Photon but we have looked at the API
Comment 12 André Malenfant CLA 2003-02-13 11:57:11 EST
Regarding this issue: the only problem i have is that when i restart eclipse, 
the window is not positioned as it was closed. My second monitor is left to the 
primary so coordinates are negative for the second monitor. Multi-monitor 
support is ok if you stretch the window over the two screens in minimize mode 
(windows). The only anoying thisg is to reposition the window manually each 
time is start Eclipse.
Comment 13 Christophe Cornu CLA 2003-03-09 19:36:24 EST
Andre: I have opened a separate bug 34239 to track down your issue.

Chris
Comment 14 Christophe Cornu CLA 2003-05-01 14:39:21 EDT
New multimonitor api has been added since I20030429.

Please see javadoc for:
org.eclipse.swt.widgets.Monitor
org.eclipse.swt.widgets.Display.getPrimaryMonitor
org.eclipse.swt.widgets.Display.getMonitors

A new snippet has been added to show how to center a Shell on the primary 
monitor.
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-
home/snippits/snippet120.html

SWT will detect multimonitor configurations on Windows, GTK 2.2 (which 
provides multimonitor api unlike older GTK 2.0), Mac, Linux Motif.