diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-04-17 20:49:53 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-04-17 20:49:53 +0200 |
commit | 30e12d259ee78272359f9da2655d0593a4f6a626 (patch) | |
tree | 3fa3feb87510ef1ab8fce795ca654af45bbf854e /src/gui_beval.c | |
parent | f9660b59b2bdaa3ec2e7b31ab52186ad8b99f047 (diff) | |
download | vim-30e12d259ee78272359f9da2655d0593a4f6a626.zip |
patch 7.4.1749
Problem: When using GTK 3.20 there are a few warnings.
Solution: Use new functions when available. (Kazunobu Kuriyama)
Diffstat (limited to 'src/gui_beval.c')
-rw-r--r-- | src/gui_beval.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui_beval.c b/src/gui_beval.c index 258ba8aeb..9a945bc8a 100644 --- a/src/gui_beval.c +++ b/src/gui_beval.c @@ -557,8 +557,13 @@ target_event_cb(GtkWidget *widget, GdkEvent *event, gpointer data) { 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 |