]> git.saurik.com Git - wxWidgets.git/commitdiff
The recent change to ::Refresh() (strangely) fails to invalidate e.g. a wxTreeCtrl...
authorRobert Roebling <robert@roebling.de>
Mon, 2 Feb 2009 14:02:50 +0000 (14:02 +0000)
committerRobert Roebling <robert@roebling.de>
Mon, 2 Feb 2009 14:02:50 +0000 (14:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/window.cpp

index 6f2da8ab52bfe45e198d0946e20f3c597a552be4..1864418244e0aad6c499ae34b0630ea4750ee01d 100644 (file)
@@ -3545,6 +3545,9 @@ void wxWindowGTK::Refresh(bool WXUNUSED(eraseBackground),
     else
         return;
 
+    if (!widget->window)
+        return;
+
     if (rect == NULL)
         gtk_widget_queue_draw(widget);
     else
@@ -3553,7 +3556,16 @@ void wxWindowGTK::Refresh(bool WXUNUSED(eraseBackground),
         if (GetLayoutDirection() == wxLayout_RightToLeft)
             x = GetClientSize().x - x - rect->width;
 
+#if 0
         gtk_widget_queue_draw_area(widget, x, rect->y, rect->width, rect->height);
+#else
+        GdkRectangle r;
+        r.x = rect->x;
+        r.y = rect->y;
+        r.width = rect->width;
+        r.height = rect->height;
+        gdk_window_invalidate_rect( m_wxwindow->window, NULL, TRUE );
+#endif
     }
 }