diff options
author | Sorokin Alexei <[email protected]> | 2016-06-16 18:09:25 +0300 |
---|---|---|
committer | raveit65 <[email protected]> | 2016-06-29 18:42:12 +0200 |
commit | 225702b3c6a609065465c66f0f2739fc1d2184a9 (patch) | |
tree | 08c677b952074a8a79b93c9d895950bdbd85799d /libmate-panel-applet/mate-panel-applet.c | |
parent | de1be3467a6ff1b350fc286025364650c8d51d1e (diff) | |
download | mate-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.c | 7 |
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 |