summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-08-08 00:15:05 +0200
committerraveit65 <[email protected]>2016-09-01 21:31:38 +0200
commit7024dfb18176ef0b429d0dc2768b1053546c76db (patch)
tree6d1f2ed31b099e269107b9ae9b1e6361e34570e3
parentf0baa2d6410eee7469dffce61fc66a2c505178fe (diff)
downloadmate-panel-7024dfb18176ef0b429d0dc2768b1053546c76db.tar.bz2
mate-panel-7024dfb18176ef0b429d0dc2768b1053546c76db.tar.xz
GTK+-3.20 force quit: use GtkSeat instead of deprecated device pointer
-rw-r--r--mate-panel/panel-force-quit.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mate-panel/panel-force-quit.c b/mate-panel/panel-force-quit.c
index 60a35323..bc4809fd 100644
--- a/mate-panel/panel-force-quit.c
+++ b/mate-panel/panel-force-quit.c
@@ -114,11 +114,11 @@ remove_popup (GtkWidget *popup)
GdkWindow *root;
#if GTK_CHECK_VERSION (3, 0, 0)
GdkDisplay *display;
- GdkDevice *pointer;
- GdkDevice *keyboard;
#if GTK_CHECK_VERSION (3, 20, 0)
GdkSeat *seat;
#else
+ GdkDevice *pointer;
+ GdkDevice *keyboard;
GdkDeviceManager *device_manager;
#endif
#endif
@@ -133,15 +133,16 @@ remove_popup (GtkWidget *popup)
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);
+
+ gdk_seat_ungrab (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);
gdk_device_ungrab (keyboard, GDK_CURRENT_TIME);
+#endif
#else
gdk_pointer_ungrab (GDK_CURRENT_TIME);
gdk_keyboard_ungrab (GDK_CURRENT_TIME);