diff options
author | Kevin Barnes <krbarnes> | 2008-07-03 20:51:22 +0000 |
---|---|---|
committer | Kevin Barnes <krbarnes> | 2008-07-03 20:51:22 +0000 |
commit | 3427395e9061c933c0eb840c638a883517ccb32f (patch) | |
tree | 686e63571972f493f8281e446832d7a254afa43e | |
parent | 4b5c98f90cd05de9b2c15d0095d4d14cb40a84f2 (diff) | |
download | eclipse.platform.swt-3427395e9061c933c0eb840c638a883517ccb32f.tar.gz eclipse.platform.swt-3427395e9061c933c0eb840c638a883517ccb32f.tar.xz eclipse.platform.swt-3427395e9061c933c0eb840c638a883517ccb32f.zip |
233261 - dialog window distorted after going out of "Not responding" state
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Decorations.java | 13 |
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 d9fd4d8078..c784511e4e 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 @@ 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) { |