From a1faaf3092cf47a274c1f9b93c312bf917a50b92 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Fri, 25 Aug 2017 11:08:25 +0200 Subject: [PATCH] Remove call of deprecated GDK function MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * src/xterm.h (XSync): Don’t call gdk_window_process_all_updates in GDK 3.22 or later. --- src/xterm.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/xterm.h b/src/xterm.h index 803feda99f3..8521cb4c9f3 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -49,13 +49,6 @@ typedef Widget xt_or_gtk_widget; #include #include -/* Some definitions to reduce conditionals. */ -typedef GtkWidget *xt_or_gtk_widget; -#undef XSync -#define XSync(d, b) do { gdk_window_process_all_updates (); \ - XSync (d, b); } while (false) -#endif /* USE_GTK */ - /* True iff GTK's version is at least I.J.K. */ #ifndef GTK_CHECK_VERSION # ifdef USE_GTK @@ -69,6 +62,18 @@ typedef GtkWidget *xt_or_gtk_widget; # endif #endif +/* Some definitions to reduce conditionals. */ +typedef GtkWidget *xt_or_gtk_widget; +#undef XSync +/* gdk_window_process_all_updates is deprecated in GDK 3.22. */ +#if GTK_CHECK_VERSION (3, 22, 0) +#define XSync(d, b) do { XSync ((d), (b)); } while (false) +#else +#define XSync(d, b) do { gdk_window_process_all_updates (); \ + XSync (d, b); } while (false) +#endif +#endif /* USE_GTK */ + /* The GtkTooltip API came in 2.12, but gtk-enable-tooltips in 2.14. */ #if GTK_CHECK_VERSION (2, 14, 0) #define USE_GTK_TOOLTIP -- 2.39.2