diff options
author | Matthias Clasen <mclasen@redhat.com> | 2018-02-07 16:31:59 -0500 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2018-04-05 19:26:54 +0200 |
commit | ec84fb90bfe0cfd5b483da42041f87aed245e648 (patch) | |
tree | a2febc310acbaa5ca8bc2caed45a569c5d09d8ac /gtk/gtkappchooserdialog.c | |
parent | 80c3ebe3a08ca9ecdb0cdb6b561281a278774536 (diff) | |
download | gtk+-ec84fb90bfe0cfd5b483da42041f87aed245e648.tar.gz |
app chooser: Stop using ::key-press-event
For now, just switch to using ::event.
Diffstat (limited to 'gtk/gtkappchooserdialog.c')
-rw-r--r-- | gtk/gtkappchooserdialog.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gtk/gtkappchooserdialog.c b/gtk/gtkappchooserdialog.c index ae6527e532..6f78a3162e 100644 --- a/gtk/gtkappchooserdialog.c +++ b/gtk/gtkappchooserdialog.c @@ -331,11 +331,14 @@ widget_populate_popup_cb (GtkAppChooserWidget *widget, } static gboolean -key_press_event_cb (GtkWidget *widget, - GdkEvent *event, - GtkSearchBar *bar) +event_cb (GtkWidget *widget, + GdkEvent *event, + GtkSearchBar *bar) { - return gtk_search_bar_handle_event (bar, event); + if (gdk_event_get_event_type (event) == GDK_KEY_PRESS) + return gtk_search_bar_handle_event (bar, event); + + return GDK_EVENT_PROPAGATE; } static void @@ -372,8 +375,8 @@ construct_appchooser_widget (GtkAppChooserDialog *self) _gtk_app_chooser_widget_set_search_entry (GTK_APP_CHOOSER_WIDGET (self->priv->app_chooser_widget), GTK_ENTRY (self->priv->search_entry)); - g_signal_connect (self, "key-press-event", - G_CALLBACK (key_press_event_cb), self->priv->search_bar); + g_signal_connect (self, "event", + G_CALLBACK (event_cb), self->priv->search_bar); } static void |