Use gdk_window_invalidate instead of gtk_widget_queue_draw as the latter doesn't e.g. invalidate a wxTreeCtrl correctly when place somewhere different from 0,0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59202 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3526,6 +3526,8 @@ bool wxWindowGTK::ScrollPages(int pages)
|
|||||||
return DoScrollByUnits(ScrollDir_Vert, ScrollUnit_Page, pages);
|
return DoScrollByUnits(ScrollDir_Vert, ScrollUnit_Page, pages);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include "wx/treectrl.h"
|
||||||
|
|
||||||
void wxWindowGTK::Refresh(bool WXUNUSED(eraseBackground),
|
void wxWindowGTK::Refresh(bool WXUNUSED(eraseBackground),
|
||||||
const wxRect *rect)
|
const wxRect *rect)
|
||||||
{
|
{
|
||||||
@@ -3541,23 +3543,21 @@ void wxWindowGTK::Refresh(bool WXUNUSED(eraseBackground),
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (rect == NULL)
|
if (rect == NULL)
|
||||||
gtk_widget_queue_draw(widget);
|
{
|
||||||
|
gdk_window_invalidate_rect( widget->window, NULL, TRUE );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int x = rect->x;
|
int x = rect->x;
|
||||||
if (GetLayoutDirection() == wxLayout_RightToLeft)
|
if (GetLayoutDirection() == wxLayout_RightToLeft)
|
||||||
x = GetClientSize().x - x - rect->width;
|
x = GetClientSize().x - x - rect->width;
|
||||||
|
|
||||||
#if 0
|
|
||||||
gtk_widget_queue_draw_area(widget, x, rect->y, rect->width, rect->height);
|
|
||||||
#else
|
|
||||||
GdkRectangle r;
|
GdkRectangle r;
|
||||||
r.x = rect->x;
|
r.x = rect->x;
|
||||||
r.y = rect->y;
|
r.y = rect->y;
|
||||||
r.width = rect->width;
|
r.width = rect->width;
|
||||||
r.height = rect->height;
|
r.height = rect->height;
|
||||||
gdk_window_invalidate_rect( m_wxwindow->window, &r, TRUE );
|
gdk_window_invalidate_rect( m_wxwindow->window, &r, TRUE );
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user