gui/drivers/Win32Interface: Fixed hangs on alpha-blended windows
authorJerome St-Louis <jerome@ecere.com>
Mon, 2 Feb 2015 04:38:57 +0000 (23:38 -0500)
committerJerome St-Louis <jerome@ecere.com>
Sun, 15 Feb 2015 20:33:16 +0000 (15:33 -0500)
ecere/src/gui/drivers/Win32Interface.ec

index ffc8128..b2ffe77 100644 (file)
@@ -584,9 +584,9 @@ class Win32Interface : Interface
                break;
             case WM_PAINT:
             {
+               PAINTSTRUCT ps;
                if(!window.alphaBlend || window.display.pixelFormat != pixelFormat888)
                {
-                  PAINTSTRUCT ps;
 
 /*
 #define ACCESS_ITEM(l, id) \
@@ -622,6 +622,11 @@ class Win32Interface : Interface
                      // window.UpdateDirty((Box *)&ps.rcPaint);
                   EndPaint(windowHandle, &ps);
                }
+               else
+               {
+                  BeginPaint(windowHandle, &ps);
+                  EndPaint(windowHandle, &ps);
+               }
                break;
             }
             case WM_DISPLAYCHANGE: