From 7f45b76c62b23445a3466cc94233a8e2c6061b33 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 6 Jan 2008 15:26:16 +0000 Subject: [PATCH] return false from Dispatch() if gtk_main_quit() was called (patch 1864846) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@51039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 4 ++++ src/gtk/evtloop.cpp | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 8d17863fd2..0933ccdc11 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -120,6 +120,10 @@ wxMSW: - Fix rare bug with messages delivered to wrong wxSocket (Tim Kosse) - Fix setting icons when they have non-default (16*16 and 32*32) sizes +wxGTK: + +- Return false from wxEventLoop::Dispatch() if gtk_main_quit() was called and + so the loop should exit (Rodolfo Schulz de Lima) 2.8.7 diff --git a/src/gtk/evtloop.cpp b/src/gtk/evtloop.cpp index 2b2bfa91c4..6b2443cae1 100644 --- a/src/gtk/evtloop.cpp +++ b/src/gtk/evtloop.cpp @@ -113,7 +113,6 @@ bool wxEventLoop::Dispatch() { wxCHECK_MSG( IsRunning(), false, _T("can't call Dispatch() if not running") ); - gtk_main_iteration(); - - return true; + // gtk_main_iteration() returns TRUE only if gtk_main_quit() was called + return !gtk_main_iteration(); }