[gtk+] GtkPlug: Avoid gdk_device_manager_get_client_pointer()



commit 56c6c722d1ff75ebb79c4c5378e71a78fcce9f4f
Author: Carlos Garnacho <carlosg gnome org>
Date:   Tue Dec 15 23:17:53 2015 +0100

    GtkPlug: Avoid gdk_device_manager_get_client_pointer()
    
    It's now deprecated

 gtk/gtkplug.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index 79ffba3..86d7d0e 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -954,9 +954,9 @@ gtk_plug_filter_func (GdkXEvent *gdk_xevent,
     case KeyRelease:
       {
         GdkModifierType state, consumed;
-        GdkDeviceManager *device_manager;
-        GdkDevice *pointer, *keyboard;
+        GdkDevice *keyboard;
         GdkKeymap *keymap;
+        GdkSeat *seat;
 
         if (xevent->type == KeyPress)
           event->key.type = GDK_KEY_PRESS;
@@ -970,9 +970,8 @@ gtk_plug_filter_func (GdkXEvent *gdk_xevent,
         event->key.hardware_keycode = xevent->xkey.keycode;
         event->key.keyval = GDK_KEY_VoidSymbol;
 
-        device_manager = gdk_display_get_device_manager (display);
-        pointer = gdk_device_manager_get_client_pointer (device_manager);
-        keyboard = gdk_device_get_associated_device (pointer);
+        seat = gdk_display_get_default_seat (display);
+        keyboard = gdk_seat_get_keyboard (seat);
         gdk_event_set_device (event, keyboard);
 
         keymap = gdk_keymap_get_for_display (display);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]