[gtk/wip/carlosg/more-device-api-cleanup: 8/13] gtkimcontext: Avoid gdk_device_get_associated_device()




commit 74718cc63879f2362ea62ba44c18bc8e99a2b49f
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Jul 30 14:29:24 2020 +0200

    gtkimcontext: Avoid gdk_device_get_associated_device()
    
    Query the seat for that.

 gtk/gtkimcontext.c | 11 -----------
 1 file changed, 11 deletions(-)
---
diff --git a/gtk/gtkimcontext.c b/gtk/gtkimcontext.c
index b6997482ee..85629b7c0d 100644
--- a/gtk/gtkimcontext.c
+++ b/gtk/gtkimcontext.c
@@ -549,7 +549,6 @@ gtk_im_context_filter_key (GtkIMContext    *context,
                            GdkModifierType  state,
                            int              group)
 {
-  GdkDevice *source_device;
   GdkTranslatedKey translated, no_lock;
   GdkEvent *key;
   gboolean ret;
@@ -560,16 +559,6 @@ gtk_im_context_filter_key (GtkIMContext    *context,
 
   g_return_val_if_fail (GTK_IS_IM_CONTEXT (context), FALSE);
 
-  if (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_LOGICAL)
-    {
-      source_device = NULL;
-    }
-  else
-    {
-      source_device = device;
-      device = gdk_device_get_associated_device (source_device);
-    }
-
   if (!gdk_display_translate_key (gdk_surface_get_display (surface),
                                   keycode,
                                   state,


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