Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
index 7c8d1d2480..1031f92ec0 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java
@@ -1345,7 +1345,18 @@ public void setVisible (boolean visible) {
oldWidth = rect.width;
oldHeight = rect.height;
}
- OS.UpdateWindow (handle);
+ /*
+ * Bug in Windows. On Vista using the Classic theme,
+ * when the window is hung and UpdateWindow() is called,
+ * nothing is drawn, and outstanding WM_PAINTs are cleared.
+ * This causes pixel corruption. The fix is to avoid calling
+ * update on hung windows.
+ */
+ boolean update = true;
+ if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0) && !OS.IsAppThemed ()) {
+ update = !OS.IsHungAppWindow (handle);
+ }
+ if (update) OS.UpdateWindow (handle);
}
} else {
if (!OS.IsWinCE) {

Back to the top