From: Philipp Stephani Date: Fri, 25 Aug 2017 09:08:25 +0000 (+0200) Subject: Remove call of deprecated GDK function X-Git-Tag: emacs-26.0.90~340 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a1faaf3092cf47a274c1f9b93c312bf917a50b92;p=emacs.git Remove call of deprecated GDK function * src/xterm.h (XSync): Don’t call gdk_window_process_all_updates in GDK 3.22 or later. --- 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