summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
diff options
context:
space:
mode:
authorSteve Northover <steve>2005-07-20 20:28:28 +0000
committerSteve Northover <steve>2005-07-20 20:28:28 +0000
commitbd8ccaacc9ef017cabd38ca03e944f5594cda26c (patch)
tree73ceace67f8505c01bfb5d1f14fcddfb1770369c /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
parent192960609106955d48292e46d3afc3671c59810e (diff)
downloadeclipse.platform.swt-bd8ccaacc9ef017cabd38ca03e944f5594cda26c.tar.gz
eclipse.platform.swt-bd8ccaacc9ef017cabd38ca03e944f5594cda26c.tar.xz
eclipse.platform.swt-bd8ccaacc9ef017cabd38ca03e944f5594cda26c.zip
XP Tabfolder theme code flashes too much when resized
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
index aa6aa182e4..00a5969570 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Group.java
@@ -370,4 +370,31 @@ LRESULT WM_SIZE (int wParam, int lParam) {
return result;
}
+LRESULT WM_UPDATEUISTATE (int wParam, int lParam) {
+ LRESULT result = super.WM_UPDATEUISTATE (wParam, lParam);
+ if (result != null) return result;
+ /*
+ * Feature in Windows. When WM_UPDATEUISTATE is sent to
+ * a group, it sends WM_CTLCOLORBTNto get the foreground
+ * and background. If drawing happens in WM_CTLCOLORBTN,
+ * it will overwrite the contents of the control. The
+ * fix is draw the group without drawing the background
+ * and avoid the group window proc.
+ *
+ * NOTE: The DefWindowProc() must be called in order to
+ * broadcast WM_UPDATEUISTATE message to the children.
+ *
+ */
+ if ((state & TRANSPARENT) != 0) {
+ if (OS.COMCTL32_MAJOR >= 6 && OS.IsAppThemed ()) {
+ Control control = findThemeControl ();
+ if (control != null) {
+ OS.InvalidateRect (handle, null, false);
+ int code = OS.DefWindowProc (handle, OS.WM_UPDATEUISTATE, wParam, lParam);
+ return new LRESULT (code);
+ }
+ }
+ }
+ return result;
+}
}