summaryrefslogtreecommitdiff
path: root/libmate-panel-applet/mate-panel-applet.c
diff options
context:
space:
mode:
authorSorokin Alexei <[email protected]>2016-06-16 18:09:25 +0300
committerraveit65 <[email protected]>2016-06-29 18:42:12 +0200
commit225702b3c6a609065465c66f0f2739fc1d2184a9 (patch)
tree08c677b952074a8a79b93c9d895950bdbd85799d /libmate-panel-applet/mate-panel-applet.c
parentde1be3467a6ff1b350fc286025364650c8d51d1e (diff)
downloadmate-panel-225702b3c6a609065465c66f0f2739fc1d2184a9.tar.bz2
mate-panel-225702b3c6a609065465c66f0f2739fc1d2184a9.tar.xz
fix some warnings and deprecations
Diffstat (limited to 'libmate-panel-applet/mate-panel-applet.c')
-rw-r--r--libmate-panel-applet/mate-panel-applet.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libmate-panel-applet/mate-panel-applet.c b/libmate-panel-applet/mate-panel-applet.c
index 9c0cfc13..8fdfe275 100644
--- a/libmate-panel-applet/mate-panel-applet.c
+++ b/libmate-panel-applet/mate-panel-applet.c
@@ -817,9 +817,12 @@ mate_panel_applet_position_menu (GtkMenu *menu,
#endif
gdk_window_get_origin (gtk_widget_get_window (widget),
&menu_x, &menu_y);
-#if GTK_CHECK_VERSION (3, 0, 0)
+#if GTK_CHECK_VERSION (3, 20, 0)
+ device = gdk_seat_get_pointer (gdk_display_get_default_seat (gtk_widget_get_display (widget)));
+ gdk_window_get_device_position (gtk_widget_get_window (widget), device, &pointer_x, &pointer_y, NULL);
+#elif GTK_CHECK_VERSION (3, 0, 0)
device = gdk_device_manager_get_client_pointer (gdk_display_get_device_manager (gtk_widget_get_display (widget)));
- gdk_window_get_device_position(gtk_widget_get_window (widget), device, &pointer_x, &pointer_y, NULL);
+ gdk_window_get_device_position (gtk_widget_get_window (widget), device, &pointer_x, &pointer_y, NULL);
#else
gtk_widget_get_pointer (widget, &pointer_x, &pointer_y);
#endif