diff dwt/widgets/Decorations.d @ 320:da968414c383

Merge changes SWT 3.4.1
author Frank Benoit <benoit@tionex.de>
date Mon, 03 Nov 2008 21:58:40 +0100
parents 27244095ce14
children
line wrap: on
line diff
--- a/dwt/widgets/Decorations.d	Thu Oct 23 23:41:09 2008 +0200
+++ b/dwt/widgets/Decorations.d	Mon Nov 03 21:58:40 2008 +0100
@@ -1405,7 +1405,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.  
+            */
+            bool update = true;
+            if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION (6, 0) && !OS.IsAppThemed ()) {
+                update = !OS.IsHungAppWindow (handle);
+            }
+            if (update) OS.UpdateWindow (handle);
         }
     } else {
         static if (!OS.IsWinCE) {