changeset 8926:fc69eed19ba7 v7.4.1749

commit https://github.com/vim/vim/commit/30e12d259ee78272359f9da2655d0593a4f6a626 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 17 20:49:53 2016 +0200 patch 7.4.1749 Problem: When using GTK 3.20 there are a few warnings. Solution: Use new functions when available. (Kazunobu Kuriyama)
author Christian Brabandt <cb@256bit.org>
date Sun, 17 Apr 2016 21:00:05 +0200
parents f0d7dfb136bc
children bab6c130bb26
files src/gui_beval.c src/gui_gtk_x11.c src/version.c
diffstat 3 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/gui_beval.c
+++ b/src/gui_beval.c
@@ -557,8 +557,13 @@ target_event_cb(GtkWidget *widget, GdkEv
 		{
 		    GdkWindow * const win = gtk_widget_get_window(widget);
 		    GdkDisplay * const dpy = gdk_window_get_display(win);
+#  if GTK_CHECK_VERSION(3,20,0)
+		    GdkSeat * const seat = gdk_display_get_default_seat(dpy);
+		    GdkDevice * const dev = gdk_seat_get_pointer(seat);
+#  else
 		    GdkDeviceManager * const mngr = gdk_display_get_device_manager(dpy);
 		    GdkDevice * const dev = gdk_device_manager_get_client_pointer(mngr);
+#  endif
 		    gdk_window_get_device_position(win, dev , &x, &y, &state);
 		}
 # else
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -1842,8 +1842,13 @@ gui_gtk_get_pointer_device(GtkWidget *wi
 {
     GdkWindow * const win = gtk_widget_get_window(widget);
     GdkDisplay * const dpy = gdk_window_get_display(win);
+# if GTK_CHECK_VERSION(3,20,0)
+    GdkSeat * const seat = gdk_display_get_default_seat(dpy);
+    return gdk_seat_get_pointer(seat);
+# else
     GdkDeviceManager * const mngr = gdk_display_get_device_manager(dpy);
     return gdk_device_manager_get_client_pointer(mngr);
+# endif
 }
 
     static GdkWindow *
--- a/src/version.c
+++ b/src/version.c
@@ -749,6 +749,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1749,
+/**/
     1748,
 /**/
     1747,