summaryrefslogtreecommitdiff
path: root/new/main_unix.c
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2015-04-10 14:24:23 -0400
committerPietro Gagliardi <[email protected]>2015-04-10 14:24:23 -0400
commit47fb015afbe44e97bf7b12628636e0c101ce5d15 (patch)
tree4cf21200759cf029bf66e53cca39392b006bf764 /new/main_unix.c
parenta272619581cd250edd0a197161e132de91e45fa5 (diff)
More TODO resolution and cross-OS behavioral parity fixes.
Diffstat (limited to 'new/main_unix.c')
-rw-r--r--new/main_unix.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/new/main_unix.c b/new/main_unix.c
index 90374c7..10af782 100644
--- a/new/main_unix.c
+++ b/new/main_unix.c
@@ -8,7 +8,16 @@ void uiMain(void)
gtk_main();
}
-void uiQuit(void)
+// 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
+static gboolean quit(gpointer data)
{
gtk_main_quit();
+ return FALSE;
+}
+
+void uiQuit(void)
+{
+ gdk_threads_add_idle(quit, NULL);
}