diff options
author | Felipe Heidrich <fheidric> | 2010-07-27 14:04:23 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2010-07-27 14:04:23 +0000 |
commit | 9ba7e6c23c78c599edae57e98b09012100af0810 (patch) | |
tree | db8be408af96e8ba9bb33b0259a9b340ccb528d1 | |
parent | aec90e773a0629e462590d9e02598e5e9d4b93a3 (diff) | |
download | eclipse.platform.swt-9ba7e6c23c78c599edae57e98b09012100af0810.tar.gz eclipse.platform.swt-9ba7e6c23c78c599edae57e98b09012100af0810.tar.xz eclipse.platform.swt-9ba7e6c23c78c599edae57e98b09012100af0810.zip |
BACKPORT: [DND] Tracker rectangle appears on wrong screen when dragging part
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java index 4469113517..17e34b0fe2 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Tracker.java @@ -365,6 +365,7 @@ void drawRectangles (Rectangle [] rects, boolean stippled) { rect1.top = rect.y - bandWidth; rect1.right = rect.x + rect.width + bandWidth * 2; rect1.bottom = rect.y + rect.height + bandWidth * 2; + OS.MapWindowPoints (0, hwndOpaque, rect1, 2); OS.RedrawWindow (hwndOpaque, rect1, 0, OS.RDW_INVALIDATE); } return; @@ -910,12 +911,20 @@ int /*long*/ transparentProc (int /*long*/ hwnd, int /*long*/ msg, int /*long*/ oldBrush = OS.SelectObject (hDC, OS.GetStockObject(OS.BLACK_BRUSH)); } Rectangle[] rects = this.rectangles; + RECT rect1 = new RECT (); for (int i=0; i<rects.length; i++) { Rectangle rect = rects [i]; - OS.PatBlt (hDC, rect.x, rect.y, rect.width, bandWidth, OS.PATCOPY); - OS.PatBlt (hDC, rect.x, rect.y + bandWidth, bandWidth, rect.height - (bandWidth * 2), OS.PATCOPY); - OS.PatBlt (hDC, rect.x + rect.width - bandWidth, rect.y + bandWidth, bandWidth, rect.height - (bandWidth * 2), OS.PATCOPY); - OS.PatBlt (hDC, rect.x, rect.y + rect.height - bandWidth, rect.width, bandWidth, OS.PATCOPY); + rect1.left = rect.x; + rect1.top = rect.y; + rect1.right = rect.x + rect.width; + rect1.bottom = rect.y + rect.height; + OS.MapWindowPoints (0, hwndOpaque, rect1, 2); + int width = rect1.right - rect1.left; + int height = rect1.bottom - rect1.top; + OS.PatBlt (hDC, rect1.left, rect1.top, width, bandWidth, OS.PATCOPY); + OS.PatBlt (hDC, rect1.left, rect1.top + bandWidth, bandWidth, height - (bandWidth * 2), OS.PATCOPY); + OS.PatBlt (hDC, rect1.right - bandWidth, rect1.top + bandWidth, bandWidth, height - (bandWidth * 2), OS.PATCOPY); + OS.PatBlt (hDC, rect1.left, rect1.bottom - bandWidth, width, bandWidth, OS.PATCOPY); } OS.SelectObject (hDC, oldBrush); if (stippled) { |