summaryrefslogtreecommitdiff
path: root/src/caja-notebook.c
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2016-01-15 23:26:05 +0100
committerWolfgang Ulbrich <[email protected]>2016-01-15 23:26:05 +0100
commit3c796cdf6020ac59cbcaca103453501292423c71 (patch)
tree1cb80a4771c7df62438a7d77f68ce9cfed8284b3 /src/caja-notebook.c
parent50970d1bb15d1f9c682e92dda345e59cfcf5330f (diff)
downloadcaja-3c796cdf6020ac59cbcaca103453501292423c71.tar.bz2
caja-3c796cdf6020ac59cbcaca103453501292423c71.tar.xz
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
Diffstat (limited to 'src/caja-notebook.c')
-rw-r--r--src/caja-notebook.c11
1 files changed, 11 insertions, 0 deletions
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 */