Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 319806

Summary: RCP display problems with multiple monitors
Product: [Eclipse Project] Platform Reporter: Elvis <elvislam>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.felipe, gemaspecial, mstorer3772, remy.suen
Version: 3.5.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
My monitor arrangement, putting the 2nd monitor on the left of the primary one so that we have negative x-coordinates
none
Dragging part border is displayed in wrong position, when a part is being dragged in order to arrange the two editor parts in parallel positions none

Description Elvis CLA 2010-07-13 22:42:11 EDT
Created attachment 174248 [details]
My monitor arrangement, putting the 2nd monitor on the left of the primary one so that we have negative x-coordinates

If the monitors are arranged in a way so that there is a monitor placed on the top (having negative y-coordinates) or on the left (having negative x-coordinates) to the primary monitor, the border of moving view region is wrongly displayed when a view is dragged around the screen.

The region border is somehow shifted by the number of pixels that the monitor is extended. However, the view can be correctly dropped at the mouse location (regardless of where the region border is drawn).

This problem happens not only to the RCP applications that I built, but also to the Eclipse IDE (version 3.5.x and 3.6) itself. This funky problem actually stops me from migrating to Win7 x64 from WinXP x86. There's no such problem in WinXP x86 at all.


OS: Windows 7 Enterprise x64
IDE: Eclipse 3.5.2 (32-bit) with JDK 1.6.20 32-bit, Eclipse 3.6 (64-bit) with JDK 1.6.20 64-bit

Steps to reproduce:
====================
1. Arrange your secondary monitor to the top or to the left of the primary one, so that its coordinates to the primary monitor have a negative number in either x or y.
2. Open Eclipse IDE, and open some view parts or editor parts in the workbench.
3. Arbitrarily select a view part, try to drag its tab around in order to move it or detach it.
4. A border for the dragged view part is drawn, but its position does not follow the mouse cursor, which is incorrect.
Comment 1 Elvis CLA 2010-07-13 22:46:24 EDT
Created attachment 174249 [details]
Dragging part border is displayed in wrong position, when a part is being dragged in order to arrange the two editor parts in parallel positions
Comment 2 Mark Storer CLA 2010-07-14 13:28:55 EDT
I'd never noticed that before, I just went by the icon.  It turns out that I have the same behavior, same config:  Windows 7, 64 bit machine with 64 bit JVM, two monitors with the primary to the right of the secondary.

Note that it only happens when Eclipse is on monitor 1.  In monitor 2, you can't see the drag box at all... presumably its being rendered off screen... which hints at a way to catch the problem: look for impossible 'x' values.
Comment 3 Elvis CLA 2010-07-14 22:56:20 EDT
Yes, it's rendered somewhere beyond screen boundary, as we can see by dragging a part from the primary monitor across to the secondary one. I think this is something to do with native calls for rendering.
Comment 4 Felipe Heidrich CLA 2010-08-09 12:21:53 EDT

*** This bug has been marked as a duplicate of bug 299451 ***