summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorAlberts Muktupāvels <[email protected]>2017-04-23 13:00:23 +0200
committerraveit65 <[email protected]>2017-05-10 17:04:22 +0200
commit024c1e487f90696bb66da4574dc607d96c5f5bbd (patch)
tree7dd3183731a6e6ce36b4817e4bedb875ce03211a /src/ui
parent146ba74e9e76f0c79af1dbefde5573cad65529ec (diff)
downloadmarco-024c1e487f90696bb66da4574dc607d96c5f5bbd.tar.bz2
marco-024c1e487f90696bb66da4574dc607d96c5f5bbd.tar.xz
ui: avoid deprecated GdkDeviceManager
taken from: https://git.gnome.org/browse/metacity/commit/?id=7ec9a6f
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/ui.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ui/ui.c b/src/ui/ui.c
index 28a9bbd5..2c1747ff 100644
--- a/src/ui/ui.c
+++ b/src/ui/ui.c
@@ -89,7 +89,11 @@ maybe_redirect_mouse_event (XEvent *xevent)
{
GdkDisplay *gdisplay;
MetaUI *ui;
+#if GTK_CHECK_VERSION(3, 20, 0)
+ GdkSeat *seat;
+#else
GdkDeviceManager *gmanager;
+#endif
GdkDevice *gdevice;
GdkEvent *gevent;
GdkWindow *gdk_window;
@@ -121,8 +125,13 @@ maybe_redirect_mouse_event (XEvent *xevent)
if (gdk_window == NULL)
return FALSE;
+#if GTK_CHECK_VERSION(3, 20, 0)
+ seat = gdk_display_get_default_seat (gdisplay);
+ gdevice = gdk_seat_get_pointer (seat);
+#else
gmanager = gdk_display_get_device_manager (gdisplay);
gdevice = gdk_device_manager_get_client_pointer (gmanager);
+#endif
/* If GDK already thinks it has a grab, we better let it see events; this
* is the menu-navigation case and events need to get sent to the appropriate