Updated configure (not only configure.in)
Refresh improvements git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
fe8aa971c4
commit
f7a11f8c8e
@ -285,7 +285,7 @@ void MyFrame::OnCount(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
int i = m_treeCtrl->GetChildrenCount( item, FALSE );
|
||||
|
||||
wxLogMessage(_T("%d children"), i);
|
||||
wxLogMessage(T("%d children"), i);
|
||||
}
|
||||
|
||||
void MyFrame::OnCountRec(wxCommandEvent& WXUNUSED(event))
|
||||
@ -296,7 +296,7 @@ void MyFrame::OnCountRec(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
int i = m_treeCtrl->GetChildrenCount( item );
|
||||
|
||||
wxLogMessage(_T("%d children"), i);
|
||||
wxLogMessage(T("%d children"), i);
|
||||
}
|
||||
|
||||
void MyFrame::DoSort(bool reverse)
|
||||
@ -324,7 +324,7 @@ void MyFrame::OnDumpSelected(wxCommandEvent& WXUNUSED(event))
|
||||
wxArrayTreeItemIds array;
|
||||
|
||||
size_t count = m_treeCtrl->GetSelections(array);
|
||||
wxLogMessage(_T("%u items selected"), count);
|
||||
wxLogMessage(T("%u items selected"), count);
|
||||
|
||||
for ( size_t n = 0; n < count; n++ )
|
||||
{
|
||||
|
@ -1011,12 +1011,14 @@ void wxListBox::OnInternalIdle()
|
||||
wxCursor cursor = m_cursor;
|
||||
if (g_globalCursor.Ok()) cursor = g_globalCursor;
|
||||
|
||||
if (GTK_WIDGET(m_list)->window && cursor.Ok() && m_currentGdkCursor != cursor)
|
||||
if (GTK_WIDGET(m_list)->window && cursor.Ok())
|
||||
{
|
||||
wxCursor oldGdkCursor = m_currentGdkCursor;
|
||||
m_currentGdkCursor = cursor;
|
||||
|
||||
gdk_window_set_cursor( GTK_WIDGET(m_list)->window, m_currentGdkCursor.GetCursor() );
|
||||
/* I now set the cursor the anew in every OnInternalIdle call
|
||||
as setting the cursor in a parent window also effects the
|
||||
windows above so that checking for the current cursor is
|
||||
not possible. */
|
||||
|
||||
gdk_window_set_cursor( GTK_WIDGET(m_list)->window, cursor.GetCursor() );
|
||||
|
||||
GList *child = m_list->children;
|
||||
while (child)
|
||||
@ -1025,15 +1027,9 @@ void wxListBox::OnInternalIdle()
|
||||
GtkWidget *label = GTK_WIDGET( bin->child );
|
||||
|
||||
if (!label->window)
|
||||
{
|
||||
/* windows not yet realized. come back later. */
|
||||
m_currentGdkCursor = oldGdkCursor;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_window_set_cursor( label->window, m_currentGdkCursor.GetCursor() );
|
||||
}
|
||||
gdk_window_set_cursor( label->window, cursor.GetCursor() );
|
||||
|
||||
child = child->next;
|
||||
}
|
||||
|
@ -604,25 +604,33 @@ void wxToolBar::OnInternalIdle()
|
||||
wxCursor cursor = m_cursor;
|
||||
if (g_globalCursor.Ok()) cursor = g_globalCursor;
|
||||
|
||||
if (cursor.Ok() && m_currentGdkCursor != cursor)
|
||||
if (cursor.Ok())
|
||||
{
|
||||
wxCursor oldGdkCursor = m_currentGdkCursor;
|
||||
m_currentGdkCursor = cursor;
|
||||
/* I now set the cursor the anew in every OnInternalIdle call
|
||||
as setting the cursor in a parent window also effects the
|
||||
windows above so that checking for the current cursor is
|
||||
not possible. */
|
||||
|
||||
if (HasFlag(wxTB_DOCKABLE))
|
||||
{
|
||||
/* if the toolbar is dockable, then m_widget stands for the
|
||||
GtkHandleBox widget, which uses its own window so that we
|
||||
can set the cursor for it. if the toolbar is not dockable,
|
||||
m_widget comes from m_toolbar which uses its parent's
|
||||
window ("windowless windows") and thus we cannot set the
|
||||
cursor. */
|
||||
gdk_window_set_cursor( m_widget->window, cursor.GetCursor() );
|
||||
}
|
||||
|
||||
wxNode *node = m_tools.First();
|
||||
while (node)
|
||||
{
|
||||
wxToolBarTool *tool = (wxToolBarTool*)node->Data();
|
||||
if (!tool->m_item->window)
|
||||
{
|
||||
/* windows not yet realized. come back later. */
|
||||
m_currentGdkCursor = oldGdkCursor;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_window_set_cursor( tool->m_item->window, m_currentGdkCursor.GetCursor() );
|
||||
}
|
||||
gdk_window_set_cursor( tool->m_item->window, cursor.GetCursor() );
|
||||
|
||||
node = node->Next();
|
||||
}
|
||||
}
|
||||
|
@ -610,9 +610,11 @@ gtk_myfixed_draw (GtkWidget *widget,
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
{
|
||||
myfixed = GTK_MYFIXED (widget);
|
||||
gtk_myfixed_paint (widget, area);
|
||||
|
||||
|
||||
children = myfixed->children;
|
||||
if (children) /* mini optimisation */
|
||||
gtk_myfixed_paint (widget, area);
|
||||
|
||||
while (children)
|
||||
{
|
||||
child = children->data;
|
||||
|
@ -686,10 +686,6 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
|
||||
if (gdk_event->count > 0)
|
||||
return;
|
||||
|
||||
wxPaintEvent event( win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
|
||||
/*
|
||||
wxPrintf( "OnExpose from " );
|
||||
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
|
||||
@ -700,6 +696,10 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
|
||||
(int)gdk_event->area.height );
|
||||
*/
|
||||
|
||||
wxPaintEvent event( win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
|
||||
win->GetUpdateRegion().Clear();
|
||||
}
|
||||
|
||||
@ -707,7 +707,7 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
|
||||
// "draw" of m_wxwindow
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static void gtk_window_draw_callback( GtkWidget *WXUNUSED(widget), GdkRectangle *rect, wxWindow *win )
|
||||
static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxWindow *win )
|
||||
{
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
@ -715,12 +715,13 @@ static void gtk_window_draw_callback( GtkWidget *WXUNUSED(widget), GdkRectangle
|
||||
if (!win->m_hasVMT)
|
||||
return;
|
||||
|
||||
GtkMyFixed *myfixed = GTK_MYFIXED (widget);
|
||||
if (!myfixed->children)
|
||||
return; /* mini optimisation */
|
||||
|
||||
win->GetUpdateRegion().Union( rect->x, rect->y,
|
||||
rect->width, rect->height );
|
||||
|
||||
wxPaintEvent event( win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
|
||||
/*
|
||||
wxPrintf( "OnDraw from " );
|
||||
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
|
||||
@ -730,7 +731,9 @@ static void gtk_window_draw_callback( GtkWidget *WXUNUSED(widget), GdkRectangle
|
||||
(int)rect->width,
|
||||
(int)rect->height );
|
||||
*/
|
||||
|
||||
|
||||
wxPaintEvent event( win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
|
||||
win->GetUpdateRegion().Clear();
|
||||
@ -1243,13 +1246,12 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion
|
||||
|
||||
if (gdk_event->is_hint)
|
||||
{
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
GdkModifierType state;
|
||||
gdk_window_get_pointer(gdk_event->window, &x, &y, &state);
|
||||
gdk_event->x = x;
|
||||
gdk_event->y = y;
|
||||
gdk_event->state = state;
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
GdkModifierType state;
|
||||
gdk_window_get_pointer(gdk_event->window, &x, &y, &state);
|
||||
gdk_event->x = x;
|
||||
gdk_event->y = y;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2036,9 +2038,9 @@ void wxWindow::PostCreation()
|
||||
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "expose_event",
|
||||
GTK_SIGNAL_FUNC(gtk_window_expose_callback), (gpointer)this );
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "draw",
|
||||
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "draw",
|
||||
GTK_SIGNAL_FUNC(gtk_window_draw_callback), (gpointer)this );
|
||||
|
||||
|
||||
#if (GTK_MINOR_VERSION > 0)
|
||||
/* these are called when the "sunken", "raised" or "simple" borders are drawn */
|
||||
gtk_signal_connect( GTK_OBJECT(m_widget), "expose_event",
|
||||
@ -2201,10 +2203,13 @@ void wxWindow::OnInternalIdle()
|
||||
wxCursor cursor = m_cursor;
|
||||
if (g_globalCursor.Ok()) cursor = g_globalCursor;
|
||||
|
||||
if (cursor.Ok() && m_currentGdkCursor != cursor)
|
||||
if (cursor.Ok())
|
||||
{
|
||||
m_currentGdkCursor = cursor;
|
||||
|
||||
/* I now set the cursor the anew in every OnInternalIdle call
|
||||
as setting the cursor in a parent window also effects the
|
||||
windows above so that checking for the current cursor is
|
||||
not possible. */
|
||||
|
||||
if (m_wxwindow)
|
||||
{
|
||||
GdkWindow *window = m_wxwindow->window;
|
||||
@ -2671,16 +2676,16 @@ void wxWindow::Refresh( bool eraseBackground, const wxRect *rect )
|
||||
if (m_wxwindow)
|
||||
{
|
||||
/* call the callback directly for preventing GTK from
|
||||
clearing the bakground */
|
||||
clearing the background */
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
GetClientSize( &w, &h );
|
||||
GdkRectangle gdk_rect;
|
||||
gdk_rect.x = 0;
|
||||
gdk_rect.y = 0;
|
||||
gdk_rect.width = w;
|
||||
gdk_rect.height = h;
|
||||
gtk_window_draw_callback( m_wxwindow, &gdk_rect, this );
|
||||
|
||||
GetUpdateRegion().Union( 0, 0, w, h );
|
||||
wxPaintEvent event( GetId() );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
GetUpdateRegion().Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2689,20 +2694,25 @@ void wxWindow::Refresh( bool eraseBackground, const wxRect *rect )
|
||||
}
|
||||
else
|
||||
{
|
||||
GdkRectangle gdk_rect;
|
||||
gdk_rect.x = rect->x;
|
||||
gdk_rect.y = rect->y;
|
||||
gdk_rect.width = rect->width;
|
||||
gdk_rect.height = rect->height;
|
||||
|
||||
if (m_wxwindow)
|
||||
{
|
||||
/* call the callback directly for preventing GTK from
|
||||
clearing the bakground */
|
||||
gtk_window_draw_callback( m_wxwindow, &gdk_rect, this );
|
||||
clearing the background */
|
||||
GetUpdateRegion().Union( rect->x, rect->y, rect->width, rect->height );
|
||||
wxPaintEvent event( GetId() );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
GetUpdateRegion().Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
GdkRectangle gdk_rect;
|
||||
gdk_rect.x = rect->x;
|
||||
gdk_rect.y = rect->y;
|
||||
gdk_rect.width = rect->width;
|
||||
gdk_rect.height = rect->height;
|
||||
|
||||
gtk_widget_draw( m_widget, &gdk_rect );
|
||||
}
|
||||
}
|
||||
@ -3018,6 +3028,7 @@ void wxWindow::CaptureMouse()
|
||||
(GdkEventMask)
|
||||
(GDK_BUTTON_PRESS_MASK |
|
||||
GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_POINTER_MOTION_HINT_MASK |
|
||||
GDK_POINTER_MOTION_MASK),
|
||||
(GdkWindow *) NULL,
|
||||
m_cursor.GetCursor(),
|
||||
|
@ -1011,12 +1011,14 @@ void wxListBox::OnInternalIdle()
|
||||
wxCursor cursor = m_cursor;
|
||||
if (g_globalCursor.Ok()) cursor = g_globalCursor;
|
||||
|
||||
if (GTK_WIDGET(m_list)->window && cursor.Ok() && m_currentGdkCursor != cursor)
|
||||
if (GTK_WIDGET(m_list)->window && cursor.Ok())
|
||||
{
|
||||
wxCursor oldGdkCursor = m_currentGdkCursor;
|
||||
m_currentGdkCursor = cursor;
|
||||
|
||||
gdk_window_set_cursor( GTK_WIDGET(m_list)->window, m_currentGdkCursor.GetCursor() );
|
||||
/* I now set the cursor the anew in every OnInternalIdle call
|
||||
as setting the cursor in a parent window also effects the
|
||||
windows above so that checking for the current cursor is
|
||||
not possible. */
|
||||
|
||||
gdk_window_set_cursor( GTK_WIDGET(m_list)->window, cursor.GetCursor() );
|
||||
|
||||
GList *child = m_list->children;
|
||||
while (child)
|
||||
@ -1025,15 +1027,9 @@ void wxListBox::OnInternalIdle()
|
||||
GtkWidget *label = GTK_WIDGET( bin->child );
|
||||
|
||||
if (!label->window)
|
||||
{
|
||||
/* windows not yet realized. come back later. */
|
||||
m_currentGdkCursor = oldGdkCursor;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_window_set_cursor( label->window, m_currentGdkCursor.GetCursor() );
|
||||
}
|
||||
gdk_window_set_cursor( label->window, cursor.GetCursor() );
|
||||
|
||||
child = child->next;
|
||||
}
|
||||
|
@ -604,25 +604,33 @@ void wxToolBar::OnInternalIdle()
|
||||
wxCursor cursor = m_cursor;
|
||||
if (g_globalCursor.Ok()) cursor = g_globalCursor;
|
||||
|
||||
if (cursor.Ok() && m_currentGdkCursor != cursor)
|
||||
if (cursor.Ok())
|
||||
{
|
||||
wxCursor oldGdkCursor = m_currentGdkCursor;
|
||||
m_currentGdkCursor = cursor;
|
||||
/* I now set the cursor the anew in every OnInternalIdle call
|
||||
as setting the cursor in a parent window also effects the
|
||||
windows above so that checking for the current cursor is
|
||||
not possible. */
|
||||
|
||||
if (HasFlag(wxTB_DOCKABLE))
|
||||
{
|
||||
/* if the toolbar is dockable, then m_widget stands for the
|
||||
GtkHandleBox widget, which uses its own window so that we
|
||||
can set the cursor for it. if the toolbar is not dockable,
|
||||
m_widget comes from m_toolbar which uses its parent's
|
||||
window ("windowless windows") and thus we cannot set the
|
||||
cursor. */
|
||||
gdk_window_set_cursor( m_widget->window, cursor.GetCursor() );
|
||||
}
|
||||
|
||||
wxNode *node = m_tools.First();
|
||||
while (node)
|
||||
{
|
||||
wxToolBarTool *tool = (wxToolBarTool*)node->Data();
|
||||
if (!tool->m_item->window)
|
||||
{
|
||||
/* windows not yet realized. come back later. */
|
||||
m_currentGdkCursor = oldGdkCursor;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_window_set_cursor( tool->m_item->window, m_currentGdkCursor.GetCursor() );
|
||||
}
|
||||
gdk_window_set_cursor( tool->m_item->window, cursor.GetCursor() );
|
||||
|
||||
node = node->Next();
|
||||
}
|
||||
}
|
||||
|
@ -610,9 +610,11 @@ gtk_myfixed_draw (GtkWidget *widget,
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
{
|
||||
myfixed = GTK_MYFIXED (widget);
|
||||
gtk_myfixed_paint (widget, area);
|
||||
|
||||
|
||||
children = myfixed->children;
|
||||
if (children) /* mini optimisation */
|
||||
gtk_myfixed_paint (widget, area);
|
||||
|
||||
while (children)
|
||||
{
|
||||
child = children->data;
|
||||
|
@ -686,10 +686,6 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
|
||||
if (gdk_event->count > 0)
|
||||
return;
|
||||
|
||||
wxPaintEvent event( win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
|
||||
/*
|
||||
wxPrintf( "OnExpose from " );
|
||||
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
|
||||
@ -700,6 +696,10 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
|
||||
(int)gdk_event->area.height );
|
||||
*/
|
||||
|
||||
wxPaintEvent event( win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
|
||||
win->GetUpdateRegion().Clear();
|
||||
}
|
||||
|
||||
@ -707,7 +707,7 @@ static void gtk_window_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExp
|
||||
// "draw" of m_wxwindow
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static void gtk_window_draw_callback( GtkWidget *WXUNUSED(widget), GdkRectangle *rect, wxWindow *win )
|
||||
static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxWindow *win )
|
||||
{
|
||||
if (g_isIdle)
|
||||
wxapp_install_idle_handler();
|
||||
@ -715,12 +715,13 @@ static void gtk_window_draw_callback( GtkWidget *WXUNUSED(widget), GdkRectangle
|
||||
if (!win->m_hasVMT)
|
||||
return;
|
||||
|
||||
GtkMyFixed *myfixed = GTK_MYFIXED (widget);
|
||||
if (!myfixed->children)
|
||||
return; /* mini optimisation */
|
||||
|
||||
win->GetUpdateRegion().Union( rect->x, rect->y,
|
||||
rect->width, rect->height );
|
||||
|
||||
wxPaintEvent event( win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
|
||||
/*
|
||||
wxPrintf( "OnDraw from " );
|
||||
if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
|
||||
@ -730,7 +731,9 @@ static void gtk_window_draw_callback( GtkWidget *WXUNUSED(widget), GdkRectangle
|
||||
(int)rect->width,
|
||||
(int)rect->height );
|
||||
*/
|
||||
|
||||
|
||||
wxPaintEvent event( win->GetId() );
|
||||
event.SetEventObject( win );
|
||||
win->GetEventHandler()->ProcessEvent( event );
|
||||
|
||||
win->GetUpdateRegion().Clear();
|
||||
@ -1243,13 +1246,12 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion
|
||||
|
||||
if (gdk_event->is_hint)
|
||||
{
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
GdkModifierType state;
|
||||
gdk_window_get_pointer(gdk_event->window, &x, &y, &state);
|
||||
gdk_event->x = x;
|
||||
gdk_event->y = y;
|
||||
gdk_event->state = state;
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
GdkModifierType state;
|
||||
gdk_window_get_pointer(gdk_event->window, &x, &y, &state);
|
||||
gdk_event->x = x;
|
||||
gdk_event->y = y;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2036,9 +2038,9 @@ void wxWindow::PostCreation()
|
||||
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "expose_event",
|
||||
GTK_SIGNAL_FUNC(gtk_window_expose_callback), (gpointer)this );
|
||||
|
||||
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "draw",
|
||||
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "draw",
|
||||
GTK_SIGNAL_FUNC(gtk_window_draw_callback), (gpointer)this );
|
||||
|
||||
|
||||
#if (GTK_MINOR_VERSION > 0)
|
||||
/* these are called when the "sunken", "raised" or "simple" borders are drawn */
|
||||
gtk_signal_connect( GTK_OBJECT(m_widget), "expose_event",
|
||||
@ -2201,10 +2203,13 @@ void wxWindow::OnInternalIdle()
|
||||
wxCursor cursor = m_cursor;
|
||||
if (g_globalCursor.Ok()) cursor = g_globalCursor;
|
||||
|
||||
if (cursor.Ok() && m_currentGdkCursor != cursor)
|
||||
if (cursor.Ok())
|
||||
{
|
||||
m_currentGdkCursor = cursor;
|
||||
|
||||
/* I now set the cursor the anew in every OnInternalIdle call
|
||||
as setting the cursor in a parent window also effects the
|
||||
windows above so that checking for the current cursor is
|
||||
not possible. */
|
||||
|
||||
if (m_wxwindow)
|
||||
{
|
||||
GdkWindow *window = m_wxwindow->window;
|
||||
@ -2671,16 +2676,16 @@ void wxWindow::Refresh( bool eraseBackground, const wxRect *rect )
|
||||
if (m_wxwindow)
|
||||
{
|
||||
/* call the callback directly for preventing GTK from
|
||||
clearing the bakground */
|
||||
clearing the background */
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
GetClientSize( &w, &h );
|
||||
GdkRectangle gdk_rect;
|
||||
gdk_rect.x = 0;
|
||||
gdk_rect.y = 0;
|
||||
gdk_rect.width = w;
|
||||
gdk_rect.height = h;
|
||||
gtk_window_draw_callback( m_wxwindow, &gdk_rect, this );
|
||||
|
||||
GetUpdateRegion().Union( 0, 0, w, h );
|
||||
wxPaintEvent event( GetId() );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
GetUpdateRegion().Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2689,20 +2694,25 @@ void wxWindow::Refresh( bool eraseBackground, const wxRect *rect )
|
||||
}
|
||||
else
|
||||
{
|
||||
GdkRectangle gdk_rect;
|
||||
gdk_rect.x = rect->x;
|
||||
gdk_rect.y = rect->y;
|
||||
gdk_rect.width = rect->width;
|
||||
gdk_rect.height = rect->height;
|
||||
|
||||
if (m_wxwindow)
|
||||
{
|
||||
/* call the callback directly for preventing GTK from
|
||||
clearing the bakground */
|
||||
gtk_window_draw_callback( m_wxwindow, &gdk_rect, this );
|
||||
clearing the background */
|
||||
GetUpdateRegion().Union( rect->x, rect->y, rect->width, rect->height );
|
||||
wxPaintEvent event( GetId() );
|
||||
event.SetEventObject( this );
|
||||
GetEventHandler()->ProcessEvent( event );
|
||||
GetUpdateRegion().Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
GdkRectangle gdk_rect;
|
||||
gdk_rect.x = rect->x;
|
||||
gdk_rect.y = rect->y;
|
||||
gdk_rect.width = rect->width;
|
||||
gdk_rect.height = rect->height;
|
||||
|
||||
gtk_widget_draw( m_widget, &gdk_rect );
|
||||
}
|
||||
}
|
||||
@ -3018,6 +3028,7 @@ void wxWindow::CaptureMouse()
|
||||
(GdkEventMask)
|
||||
(GDK_BUTTON_PRESS_MASK |
|
||||
GDK_BUTTON_RELEASE_MASK |
|
||||
GDK_POINTER_MOTION_HINT_MASK |
|
||||
GDK_POINTER_MOTION_MASK),
|
||||
(GdkWindow *) NULL,
|
||||
m_cursor.GetCursor(),
|
||||
|
@ -137,6 +137,9 @@ gtk_glwindow_realized_callback( GtkWidget * WXUNUSED(widget), wxGLCanvas *win )
|
||||
{
|
||||
win->m_glContext = new wxGLContext( TRUE, win, wxNullPalette, win->m_glContext );
|
||||
|
||||
XFree( g_vi );
|
||||
g_vi = (XVisualInfo*) NULL;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@ -241,12 +244,6 @@ bool wxGLCanvas::Create( wxWindow *parent,
|
||||
gtk_widget_pop_visual();
|
||||
gtk_widget_pop_colormap();
|
||||
|
||||
/* must be realized for OpenGl output */
|
||||
gtk_widget_realize( m_glWidget );
|
||||
|
||||
XFree( g_vi );
|
||||
g_vi = (XVisualInfo*) NULL;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ void TestGLCanvas::OnSize(wxSizeEvent& event)
|
||||
{
|
||||
int width, height;
|
||||
GetClientSize(& width, & height);
|
||||
|
||||
|
||||
#ifndef __WXMOTIF__
|
||||
if (GetContext())
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user