summaryrefslogtreecommitdiffstats
path: root/bundles
diff options
context:
space:
mode:
authorSteve Northover <steve>2008-07-29 18:17:57 +0000
committerSteve Northover <steve>2008-07-29 18:17:57 +0000
commitd8985a1aa12131cdaa1972eb0c3b35ef1d733024 (patch)
treec48a65f76f5e1067d4f40065532fa2e66ed93253 /bundles
parentcf73aee34de78ef8968b2e3d6a0dfd3a1791a002 (diff)
downloadeclipse.platform.swt-d8985a1aa12131cdaa1972eb0c3b35ef1d733024.tar.gz
eclipse.platform.swt-d8985a1aa12131cdaa1972eb0c3b35ef1d733024.tar.xz
eclipse.platform.swt-d8985a1aa12131cdaa1972eb0c3b35ef1d733024.zip
97496 - Table: setBackground is not deferred by setRedraw(false)
Diffstat (limited to 'bundles')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java13
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java7
2 files changed, 20 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
index 30acdfdfdd..4ce21fb8da 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/List.java
@@ -1656,6 +1656,19 @@ LRESULT WM_KEYDOWN (int /*long*/ wParam, int /*long*/ lParam) {
return result;
}
+LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
+ LRESULT result = super.WM_SETREDRAW (wParam, lParam);
+ if (result != null) return result;
+ /*
+ * Bug in Windows. When WM_SETREDRAW is used to turn off
+ * redraw for a list, table or tree, the background of the
+ * control is drawn. The fix is to call DefWindowProc(),
+ * which stops all graphics output to the control.
+ */
+ OS.DefWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
+ return result;
+}
+
LRESULT WM_SIZE (int /*long*/ wParam, int /*long*/ lParam) {
/*
* Bug in Windows. If the top index is changed while the
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
index 0b56cd996b..b9850c6888 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Table.java
@@ -5926,6 +5926,13 @@ LRESULT WM_SETREDRAW (int /*long*/ wParam, int /*long*/ lParam) {
}
}
}
+ /*
+ * Bug in Windows. When WM_SETREDRAW is used to turn off
+ * redraw for a list, table or tree, the background of the
+ * control is drawn. The fix is to call DefWindowProc(),
+ * which stops all graphics output to the control.
+ */
+ OS.DefWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
int /*long*/ code = callWindowProc (handle, OS.WM_SETREDRAW, wParam, lParam);
if (wParam == 0) {
if ((int)/*64*/OS.SendMessage (handle, OS.LVM_GETBKCOLOR, 0, 0) == OS.CLR_NONE) {