233261 - dialog window distorted after going out of "Not responding" state
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 d9fd4d8..c784511 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
@@ -1375,7 +1375,18 @@
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) {