[gtk/current-event-apis: 1/7] entrycompletion: Remove an unused field



commit 46ad06900e716f1746027daf117f774d3c4ff1d6
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Apr 11 13:09:45 2020 -0400

    entrycompletion: Remove an unused field
    
    No point in storing a device that is never used.

 gtk/gtkentrycompletion.c | 9 ---------
 gtk/gtkentryprivate.h    | 2 --
 2 files changed, 11 deletions(-)
---
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index ad0b36d634..1d5f32fae9 100644
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -2233,7 +2233,6 @@ gtk_entry_completion_changed (GtkWidget *widget,
                               gpointer   user_data)
 {
   GtkEntryCompletion *completion = GTK_ENTRY_COMPLETION (user_data);
-  GdkDevice *device;
 
   if (!completion->priv->popup_completion)
     return;
@@ -2257,14 +2256,6 @@ gtk_entry_completion_changed (GtkWidget *widget,
       return;
     }
 
-  device = gtk_get_current_event_device ();
-
-  if (device && gdk_device_get_source (device) == GDK_SOURCE_KEYBOARD)
-    device = gdk_device_get_associated_device (device);
-
-  if (device)
-    completion->priv->device = device;
-
   completion->priv->completion_timeout =
     g_timeout_add (COMPLETION_TIMEOUT,
                    gtk_entry_completion_timeout,
diff --git a/gtk/gtkentryprivate.h b/gtk/gtkentryprivate.h
index de765d9b49..af5e24cd8c 100644
--- a/gtk/gtkentryprivate.h
+++ b/gtk/gtkentryprivate.h
@@ -104,8 +104,6 @@ struct _GtkEntryCompletionPrivate
   gchar *completion_prefix;
 
   GSource *check_completion_idle;
-
-  GdkDevice *device;
 };
 
 void     _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion);


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