From 8bf24cb7913762b6e226b36176e6f883e470d37e Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 24 May 2016 22:29:33 -0400 Subject: [PATCH] Implemented uiMainStep() on GTK+. --- unix/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/unix/main.c b/unix/main.c index 50f308bd..bfd05448 100644 --- a/unix/main.c +++ b/unix/main.c @@ -34,6 +34,16 @@ void uiMain(void) gtk_main(); } +int uiMainStep(int wait) +{ + gboolean block; + + block = FALSE; + if (wait) + block = TRUE; + return gtk_main_iteration_do(block) == FALSE; +} + // gtk_main_quit() may run immediately, or it may wait for other pending events; "it depends" (thanks mclasen in irc.gimp.net/#gtk+) // PostQuitMessage() on Windows always waits, so we must do so too // we'll do it by using an idle callback