diff options
author | Felipe Heidrich <fheidric> | 2010-01-19 20:54:02 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2010-01-19 20:54:02 +0000 |
commit | eeddf1ccd6b462299e1cfc5a858465af29977bf7 (patch) | |
tree | 84e55e5383e06f8e0534a091d391a09b9c39d1d0 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java | |
parent | 50cbdfb7340bdb36504c0fee05b609fe37ccf62c (diff) | |
download | eclipse.platform.swt-eeddf1ccd6b462299e1cfc5a858465af29977bf7.tar.gz eclipse.platform.swt-eeddf1ccd6b462299e1cfc5a858465af29977bf7.tar.xz eclipse.platform.swt-eeddf1ccd6b462299e1cfc5a858465af29977bf7.zip |
Bug 299714 - Control.print(GC) renders control state unusable (win 7)
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 | 10 |
1 files changed, 6 insertions, 4 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 1e47ec752f..c9d40265bc 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 @@ -2078,12 +2078,13 @@ void printWidget (int /*long*/ hwnd, int /*long*/ hdc, GC gc) { int y = OS.GetSystemMetrics (OS.SM_YVIRTUALSCREEN); int width = OS.GetSystemMetrics (OS.SM_CXVIRTUALSCREEN); int height = OS.GetSystemMetrics (OS.SM_CYVIRTUALSCREEN); - int flags = OS.SWP_NOSIZE | OS.SWP_NOZORDER | OS.SWP_NOACTIVATE | OS.SWP_DRAWFRAME; if ((bits & OS.WS_VISIBLE) != 0) { OS.DefWindowProc (hwnd, OS.WM_SETREDRAW, 0, 0); } - SetWindowPos (hwnd, 0, x + width, y + height, 0, 0, flags); + OS.SetWindowLong (hwnd, OS.GWL_STYLE, (bits & ~OS.WS_CHILD) | OS.WS_POPUP); OS.SetParent (hwnd, 0); + int flags = OS.SWP_NOSIZE | OS.SWP_NOZORDER | OS.SWP_NOACTIVATE; + SetWindowPos (hwnd, 0, x + width, y + height, 0, 0, flags); if ((bits & OS.WS_VISIBLE) != 0) { OS.DefWindowProc (hwnd, OS.WM_SETREDRAW, 1, 0); } @@ -2099,10 +2100,11 @@ void printWidget (int /*long*/ hwnd, int /*long*/ hdc, GC gc) { if ((bits & OS.WS_VISIBLE) != 0) { OS.DefWindowProc (hwnd, OS.WM_SETREDRAW, 0, 0); } + OS.SetWindowLong (hwnd, OS.GWL_STYLE, bits); OS.SetParent (hwnd, hwndParent); OS.MapWindowPoints (0, hwndParent, rect1, 2); - int flags = OS.SWP_NOSIZE | OS.SWP_NOACTIVATE | OS.SWP_DRAWFRAME; - SetWindowPos (hwnd, hwndInsertAfter, rect1.left, rect1.top, rect1.right - rect1.left, rect1.bottom - rect1.top, flags); + int flags = OS.SWP_NOSIZE | OS.SWP_NOACTIVATE; + SetWindowPos (hwnd, hwndInsertAfter, rect1.left, rect1.top, 0, 0, flags); if ((bits & OS.WS_VISIBLE) != 0) { OS.DefWindowProc (hwnd, OS.WM_SETREDRAW, 1, 0); } |