From 3c796cdf6020ac59cbcaca103453501292423c71 Mon Sep 17 00:00:00 2001 From: Wolfgang Ulbrich Date: Fri, 15 Jan 2016 23:26:05 +0100 Subject: GTK3 all: don't use deprecated GDK pointer methods Use the new GdkDevice methods instead. taken from: https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-4&id=a816e00 https://git.gnome.org/browse/nautilus/commit/?h=gnome-3-4&id=cdf858f --- src/caja-notebook.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/caja-notebook.c b/src/caja-notebook.c index 2bd6a208..ccfa751f 100644 --- a/src/caja-notebook.c +++ b/src/caja-notebook.c @@ -110,12 +110,23 @@ caja_notebook_class_init (CajaNotebookClass *klass) static CajaNotebook * find_notebook_at_pointer (gint abs_x, gint abs_y) { +#if GTK_CHECK_VERSION(3, 0, 0) + GdkDeviceManager *manager; + GdkDevice *pointer; +#endif GdkWindow *win_at_pointer, *toplevel_win; gpointer toplevel = NULL; gint x, y; /* FIXME multi-head */ +#if GTK_CHECK_VERSION(3, 0, 0) + manager = gdk_display_get_device_manager (gdk_display_get_default ()); + pointer = gdk_device_manager_get_client_pointer (manager); + win_at_pointer = gdk_device_get_window_at_position (pointer, &x, &y); +#else win_at_pointer = gdk_window_at_pointer (&x, &y); +#endif + if (win_at_pointer == NULL) { /* We are outside all windows containing a notebook */ -- cgit v1.2.1