From 734dd6d6b66067ad8ddb51d312f463cc7bb11d28 Mon Sep 17 00:00:00 2001 From: Scoopta Date: Thu, 19 Sep 2019 00:45:57 -0700 Subject: [PATCH] Fixed some of the bugs introduced by the recent change to not focus the entry by default --- src/wofi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wofi.c b/src/wofi.c index 0d9220c..b9b3d4e 100644 --- a/src/wofi.c +++ b/src/wofi.c @@ -330,9 +330,12 @@ static gboolean key_press(GtkWidget* widget, GdkEvent* event, gpointer data) { case GDK_KEY_Left: case GDK_KEY_Right: case GDK_KEY_Return: + if(gtk_widget_has_focus(scroll)) { + gtk_entry_grab_focus_without_selecting(GTK_ENTRY(entry)); + } break; case GDK_KEY_Down: - if(gtk_widget_has_focus(entry)) { + if(gtk_widget_has_focus(entry) || gtk_widget_has_focus(scroll)) { GtkFlowBoxChild* child = gtk_flow_box_get_child_at_pos(GTK_FLOW_BOX(inner_box), 0, 0); gtk_widget_grab_focus(GTK_WIDGET(child)); gtk_flow_box_select_child(GTK_FLOW_BOX(inner_box), child);