summaryrefslogtreecommitdiff
path: root/mate-panel/panel-force-quit.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 /mate-panel/panel-force-quit.c
parentde1be3467a6ff1b350fc286025364650c8d51d1e (diff)
downloadmate-panel-225702b3c6a609065465c66f0f2739fc1d2184a9.tar.bz2
mate-panel-225702b3c6a609065465c66f0f2739fc1d2184a9.tar.xz
fix some warnings and deprecations
Diffstat (limited to 'mate-panel/panel-force-quit.c')
-rw-r--r--mate-panel/panel-force-quit.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/mate-panel/panel-force-quit.c b/mate-panel/panel-force-quit.c
index 842922b2..ac7611a3 100644
--- a/mate-panel/panel-force-quit.c
+++ b/mate-panel/panel-force-quit.c
@@ -116,8 +116,12 @@ remove_popup (GtkWidget *popup)
GdkDisplay *display;
GdkDevice *pointer;
GdkDevice *keyboard;
+#if GTK_CHECK_VERSION (3, 20, 0)
+ GdkSeat *seat;
+#else
GdkDeviceManager *device_manager;
#endif
+#endif
root = gdk_screen_get_root_window (
gtk_window_get_screen (GTK_WINDOW (popup)));
@@ -127,8 +131,13 @@ remove_popup (GtkWidget *popup)
#if GTK_CHECK_VERSION (3, 0, 0)
display = gdk_window_get_display (root);
+#if GTK_CHECK_VERSION (3, 20, 0)
+ seat = gdk_display_get_default_seat (display);
+ pointer = gdk_seat_get_pointer (seat);
+#else
device_manager = gdk_display_get_device_manager (display);
pointer = gdk_device_manager_get_client_pointer (device_manager);
+#endif
keyboard = gdk_device_get_associated_device (pointer);
gdk_device_ungrab (pointer, GDK_CURRENT_TIME);
@@ -339,11 +348,15 @@ panel_force_quit (GdkScreen *screen,
GtkWidget *popup;
GdkWindow *root;
#if GTK_CHECK_VERSION (3, 0, 0)
- GdkDisplay *display;
- GdkDevice *pointer;
- GdkDevice *keyboard;
+ GdkDisplay *display;
+ GdkDevice *pointer;
+ GdkDevice *keyboard;
+#if GTK_CHECK_VERSION (3, 20, 0)
+ GdkSeat *seat;
+#else
GdkDeviceManager *device_manager;
#endif
+#endif
popup = display_popup_window (screen);
@@ -354,8 +367,13 @@ panel_force_quit (GdkScreen *screen,
GDK_CROSS);
#if GTK_CHECK_VERSION (3, 0, 0)
display = gdk_window_get_display (root);
+#if GTK_CHECK_VERSION (3, 20, 0)
+ seat = gdk_display_get_default_seat (display);
+ pointer = gdk_seat_get_pointer (seat);
+#else
device_manager = gdk_display_get_device_manager (display);
pointer = gdk_device_manager_get_client_pointer (device_manager);
+#endif
keyboard = gdk_device_get_associated_device (pointer);
status = gdk_device_grab (pointer, root,