summaryrefslogtreecommitdiff
path: root/mate-panel/panel-force-quit.c
diff options
context:
space:
mode:
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,