From 7cb3d3bba149ec69fc03bf261556cfe92a9d2b40 Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Sun, 27 Aug 2017 13:53:36 +0200 Subject: [PATCH] Use GdkSeat in new GDK versions * src/gtkutil.c (xg_event_is_for_scrollbar): Use GdkSeat instead of GdkDeviceManager in GDK 3.20+ --- src/gtkutil.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gtkutil.c b/src/gtkutil.c index 0c8395efe9b..2675cd51586 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -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); -- 2.39.2