Minor optimization in wxGTK wxYield()
Don't call gdk_window_get_display() if we don't need it because we don't have any events to put back into the display queue.
This commit is contained in:
parent
1a438e786c
commit
cc37031d46
@ -385,7 +385,9 @@ void wxGUIEventLoop::DoYieldFor(long eventsToProcess)
|
||||
|
||||
wxEventLoopBase::DoYieldFor(eventsToProcess);
|
||||
|
||||
// put all unprocessed GDK events back in the queue
|
||||
// put any unprocessed GDK events back in the queue
|
||||
if ( !m_arrGdkEvents.IsEmpty() )
|
||||
{
|
||||
GdkDisplay* disp = gdk_window_get_display(wxGetTopLevelGDK());
|
||||
for (size_t i=0; i<m_arrGdkEvents.GetCount(); i++)
|
||||
{
|
||||
@ -397,4 +399,5 @@ void wxGUIEventLoop::DoYieldFor(long eventsToProcess)
|
||||
}
|
||||
|
||||
m_arrGdkEvents.Clear();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user