summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
diff options
context:
space:
mode:
authorSteve Northover <steve>2007-07-19 16:23:48 +0000
committerSteve Northover <steve>2007-07-19 16:23:48 +0000
commit12917518bee3a227f438e29fb003e026839ee122 (patch)
tree4bfbc5876b7d4bdb1067c20bb36c32443fe3b342 /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java
parenta62cb4f3b5a52f32bd2e8a19c653c47c8c62cdfd (diff)
downloadeclipse.platform.swt-12917518bee3a227f438e29fb003e026839ee122.tar.gz
eclipse.platform.swt-12917518bee3a227f438e29fb003e026839ee122.tar.xz
eclipse.platform.swt-12917518bee3a227f438e29fb003e026839ee122.zip
187210 - Ownerdraw - 'Show status line' on open type dialog does not redraw status line when colored labels
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java20
1 files changed, 17 insertions, 3 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 f65da4bd58..f661f2393e 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
@@ -4472,9 +4472,23 @@ LRESULT WM_WINDOWPOSCHANGING (int /*long*/ wParam, int /*long*/ lParam) {
if ((lpwp.flags & OS.SWP_NOMOVE) == 0 || (lpwp.flags & OS.SWP_NOSIZE) == 0) {
RECT rect = new RECT ();
OS.GetWindowRect (topHandle (), rect);
- int /*long*/ hwndParent = parent == null ? 0 : parent.handle;
- OS.MapWindowPoints (0, hwndParent, rect, 2);
- OS.InvalidateRect (hwndParent, rect, true);
+ int width = rect.right - rect.left;
+ int height = rect.bottom - rect.top;
+ if (width != 0 && height != 0) {
+ int /*long*/ hwndParent = parent == null ? 0 : parent.handle;
+ OS.MapWindowPoints (0, hwndParent, rect, 2);
+ if (OS.IsWinCE) {
+ OS.InvalidateRect (hwndParent, rect, true);
+ } else {
+ int /*long*/ rgn1 = OS.CreateRectRgn (rect.left, rect.top, rect.right, rect.bottom);
+ int /*long*/ rgn2 = OS.CreateRectRgn (lpwp.x, lpwp.y, lpwp.x + lpwp.cx, lpwp.y + lpwp.cy);
+ OS.CombineRgn (rgn1, rgn1, rgn2, OS.RGN_DIFF);
+ int flags = OS.RDW_ERASE | OS.RDW_FRAME | OS.RDW_INVALIDATE | OS.RDW_ALLCHILDREN;
+ OS.RedrawWindow (hwndParent, null, rgn1, flags);
+ OS.DeleteObject (rgn1);
+ OS.DeleteObject (rgn2);
+ }
+ }
}
}
}