]> git.eshelyaron.com Git - emacs.git/commitdiff
Use GdkSeat in new GDK versions
authorPhilipp Stephani <phst@google.com>
Sun, 27 Aug 2017 11:53:36 +0000 (13:53 +0200)
committerPhilipp Stephani <phst@google.com>
Sun, 27 Aug 2017 11:53:36 +0000 (13:53 +0200)
* src/gtkutil.c (xg_event_is_for_scrollbar): Use GdkSeat instead of
GdkDeviceManager in GDK 3.20+

src/gtkutil.c

index 0c8395efe9ba7adad242e6ccf8d16fc069778f78..2675cd5158661fee20d4e1389c4411adfa8754b4 100644 (file)
@@ -4138,8 +4138,13 @@ xg_event_is_for_scrollbar (struct frame *f, const XEvent *event)
       GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f));
       GdkWindow *gwin;
 #ifdef HAVE_GTK3
+#if GTK_CHECK_VERSION (3, 20, 0)
+      GdkDevice *gdev
+        = gdk_seat_get_pointer (gdk_display_get_default_seat (gdpy));
+#else
       GdkDevice *gdev = gdk_device_manager_get_client_pointer
         (gdk_display_get_device_manager (gdpy));
+#endif
       gwin = gdk_device_get_window_at_position (gdev, NULL, NULL);
 #else
       gwin = gdk_display_get_window_at_pointer (gdpy, NULL, NULL);