diff --git a/unix/gtkcomm.c b/unix/gtkcomm.c index 28884654..9c3d1c53 100644 --- a/unix/gtkcomm.c +++ b/unix/gtkcomm.c @@ -203,40 +203,9 @@ static int idle_fn_scheduled; static void notify_toplevel_callback(void *); -/* - * Replacement code for the gtk_quit_add() function, which GTK2 - in - * their unbounded wisdom - deprecated without providing any usable - * replacement, and which we were using to ensure that our idle - * function for toplevel callbacks was only run from the outermost - * gtk_main(). - * - * We must make sure that all our subsidiary calls to gtk_main() are - * followed by a call to post_main(), so that the idle function can be - * re-established when we end up back at the top level. - */ -void post_main(void) -{ - if (gtk_main_level() == 1) - notify_toplevel_callback(NULL); -} - static gint idle_toplevel_callback_func(gpointer data) { - if (gtk_main_level() > 1) { - /* - * We don't run callbacks if we're in the middle of a - * subsidiary gtk_main. So unschedule this idle function; it - * will be rescheduled by post_main() when we come back up a - * level, which is the earliest we might actually do - * something. - */ - if (idle_fn_scheduled) { /* double-check, just in case */ - g_source_remove(toplevel_callback_idle_id); - idle_fn_scheduled = FALSE; - } - } else { - run_toplevel_callbacks(); - } + run_toplevel_callbacks(); /* * If we've emptied our toplevel callback queue, unschedule diff --git a/unix/unix.h b/unix/unix.h index cc9e71d8..8dcfa24f 100644 --- a/unix/unix.h +++ b/unix/unix.h @@ -161,7 +161,6 @@ enum DialogSlot { void register_dialog(void *frontend, enum DialogSlot slot, GtkWidget *dialog); void unregister_dialog(void *frontend, enum DialogSlot slot); #endif -void post_main(void); /* called after any subsidiary gtk_main() */ /* Things pterm.c needs from gtkdlg.c */ #ifdef MAY_REFER_TO_GTK_IN_HEADERS