From cc37031d46f6d3668ae1cb2e995b1a6e552a5201 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 5 Jun 2016 00:55:20 +0200 Subject: [PATCH] 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. --- src/gtk/evtloop.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/gtk/evtloop.cpp b/src/gtk/evtloop.cpp index 9e7a2f44d2..7a2a98c4ef 100644 --- a/src/gtk/evtloop.cpp +++ b/src/gtk/evtloop.cpp @@ -385,16 +385,19 @@ void wxGUIEventLoop::DoYieldFor(long eventsToProcess) wxEventLoopBase::DoYieldFor(eventsToProcess); - // put all unprocessed GDK events back in the queue - GdkDisplay* disp = gdk_window_get_display(wxGetTopLevelGDK()); - for (size_t i=0; i