]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
Now updating and clearing are done in a delayed fashion.
[wxWidgets.git] / src / msw / window.cpp
index 1f7b9370099142b00b37dce6466b881de75259ff..285299a2ff7f5e9a7207caa13511a5ae07f86394 100644 (file)
@@ -901,16 +901,22 @@ void wxWindowMSW::SetScrollbar(int orient, int pos, int thumbVisible,
 
 void wxWindowMSW::ScrollWindow(int dx, int dy, const wxRect *prect)
 {
-    RECT rect;
+    RECT rect, *pr;
     if ( prect )
     {
         rect.left = prect->x;
         rect.top = prect->y;
         rect.right = prect->x + prect->width;
         rect.bottom = prect->y + prect->height;
+
+        pr = ▭
+    }
+    else
+    {
+        pr = NULL;
     }
 
-    ::ScrollWindow(GetHwnd(), dx, dy, prect ? &rect : NULL, NULL);
+    ::ScrollWindow(GetHwnd(), dx, dy, pr, pr);
 }
 
 static bool ScrollVertically(HWND hwnd, int kind, int count)
@@ -1180,7 +1186,7 @@ void wxWindowMSW::OnIdle(wxIdleEvent& WXUNUSED(event))
     // Check if we need to send a LEAVE event
     if ( m_mouseInWindow )
     {
-        if ( !IsMouseInWindow() && HasCapture())
+        if ( !IsMouseInWindow() && !HasCapture())
         {
             // Generate a LEAVE event
             m_mouseInWindow = FALSE;