From 46c9d4c192b77c8ecc24add2512a7b57b6e40823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Wed, 5 Jan 2022 12:37:07 +0100 Subject: [PATCH] GTK2: Fixed a few more uses of g_main_iteration(). Fixes some deprecation warnings. --- src/post_modules/GTK2/source/global.pre | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/post_modules/GTK2/source/global.pre b/src/post_modules/GTK2/source/global.pre index 7ffb326f0a..bbf0f4cac5 100644 --- a/src/post_modules/GTK2/source/global.pre +++ b/src/post_modules/GTK2/source/global.pre @@ -272,7 +272,13 @@ void flush() //! Flush GDK. Not normally needed, can be useful while doing calculations. { gdk_flush(); + +#ifdef HAVE_GTK22 + while(g_main_context_iteration(NULL,0)); +#else while(g_main_iteration( 0 ) ); +#endif + pgtk2_pop_n_elems(args); push_int(0); } @@ -329,7 +335,11 @@ int main_iteration_do(int block) INT_TYPE n; get_all_args( "gtk_main_iteration_do", args, "%i", &n ); pgtk2_pop_n_elems(args); +#ifdef HAVE_GTK22 + push_int(g_main_context_iteration(NULL, n)); +#else push_int( g_main_iteration( n ) ); +#endif } int true() -- GitLab