diff options
author | Silenio Quarti <silenio> | 2009-03-16 15:01:12 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2009-03-16 15:01:12 +0000 |
commit | 6b21c613af06913e758e874972bf16c1d459c7a5 (patch) | |
tree | f8afad124b881b2c15a7c96f3374b618adee1e0e /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java | |
parent | c955abd844bff803b3f77692a3530172c2fbd266 (diff) | |
download | eclipse.platform.swt-6b21c613af06913e758e874972bf16c1d459c7a5.tar.gz eclipse.platform.swt-6b21c613af06913e758e874972bf16c1d459c7a5.tar.xz eclipse.platform.swt-6b21c613af06913e758e874972bf16c1d459c7a5.zip |
267466 - [SWT_AWT] Browser.print(GC) should not use AWT component ancestor clip
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java index a01bfdd6c3..7c4eff6fff 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java @@ -2036,6 +2036,17 @@ void printWidget (int /*long*/ hwnd, int /*long*/ hdc, GC gc) { OS.GetWindowRect (hwndShell, rect2); OS.IntersectRect (rect2, rect1, rect2); boolean fixPrintWindow = !OS.EqualRect (rect2, rect1); + if (!fixPrintWindow) { + int /*long*/ rgn = OS.CreateRectRgn(0, 0, 0, 0); + int /*long*/ parent = OS.GetParent(hwnd); + while (parent != hwndShell && !fixPrintWindow) { + if (OS.GetWindowRgn(parent, rgn) != 0) { + fixPrintWindow = true; + } + parent = OS.GetParent(parent); + } + OS.DeleteObject(rgn); + } int bits = OS.GetWindowLong (hwnd, OS.GWL_STYLE); int /*long*/ hwndInsertAfter = OS.GetWindow (hwnd, OS.GW_HWNDPREV); /* @@ -2048,6 +2059,7 @@ void printWidget (int /*long*/ hwnd, int /*long*/ hdc, GC gc) { if (hwndInsertAfter == 0 || hwndInsertAfter == hwnd) { hwndInsertAfter = OS.HWND_TOP; } + System.out.println("fixPrintWindow=" + fixPrintWindow); if (fixPrintWindow) { int x = OS.GetSystemMetrics (OS.SM_XVIRTUALSCREEN); int y = OS.GetSystemMetrics (OS.SM_YVIRTUALSCREEN); |