summaryrefslogtreecommitdiff
path: root/examples/search-bar.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/search-bar.c')
-rw-r--r--examples/search-bar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/search-bar.c b/examples/search-bar.c
index 2dfeddf413..136354ac84 100644
--- a/examples/search-bar.c
+++ b/examples/search-bar.c
@@ -41,10 +41,11 @@ activate_cb (GtkApplication *app,
gtk_search_bar_connect_entry (GTK_SEARCH_BAR (search_bar), GTK_ENTRY (entry));
- controller = gtk_event_controller_key_new (window);
+ controller = gtk_event_controller_key_new ();
g_object_set_data_full (G_OBJECT (window), "controller", controller, g_object_unref);
g_signal_connect (controller, "key-pressed",
G_CALLBACK (window_key_pressed), search_bar);
+ gtk_widget_add_controller (window, controller);
}
gint