From 20aef29dc55b0fe97a758b71efd2082fe20773e8 Mon Sep 17 00:00:00 2001 From: Scoopta Date: Thu, 4 Feb 2021 01:01:36 -0800 Subject: [PATCH 1/2] v1.2.4: Fixed key_submit not properly working with multi-action entires --- .hgignore | 1 + meson.build | 2 +- src/wofi.c | 16 +++++++++++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.hgignore b/.hgignore index 83dacc7..7d2c722 100644 --- a/.hgignore +++ b/.hgignore @@ -5,3 +5,4 @@ ^build$ ^debug$ ^Debug$ +^noasan$ diff --git a/meson.build b/meson.build index 74ac0bc..1ba72f6 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('wofi', 'c', version : 'v1.2.2', default_options : ['c_std=c99', 'buildtype=release', 'warning_level=2']) +project('wofi', 'c', version : 'v1.2.4', default_options : ['c_std=c99', 'buildtype=release', 'warning_level=2']) cc = meson.get_compiler('c') pkgcfg = import('pkgconfig') diff --git a/src/wofi.c b/src/wofi.c index 305a393..d6281c8 100644 --- a/src/wofi.c +++ b/src/wofi.c @@ -1294,9 +1294,19 @@ static gboolean key_press(GtkWidget* widget, GdkEvent* event, gpointer data) { GList* children = gtk_flow_box_get_selected_children(GTK_FLOW_BOX(inner_box)); if(gtk_widget_has_focus(entry)) { g_signal_emit_by_name(entry, "activate", entry, NULL); - } else if(gtk_widget_has_focus(inner_box) || (children->data != NULL && gtk_widget_has_focus(children->data))) { - if(children->data != NULL) { - g_signal_emit_by_name(children->data, "activate", children->data, NULL); + } else if(gtk_widget_has_focus(inner_box) || children->data != NULL) { + gpointer obj = children->data; + + if(obj != NULL) { + GtkWidget* exp = gtk_bin_get_child(GTK_BIN(obj)); + if(GTK_IS_EXPANDER(exp)) { + GtkWidget* box = gtk_bin_get_child(GTK_BIN(exp)); + GtkListBoxRow* row = gtk_list_box_get_selected_row(GTK_LIST_BOX(box)); + if(row != NULL) { + obj = row; + } + } + g_signal_emit_by_name(obj, "activate", obj, NULL); } } g_list_free(children); From f6f4f6dd90e05f451acce6b38f68bb79d4bb1d95 Mon Sep 17 00:00:00 2001 From: Scoopta Date: Thu, 4 Feb 2021 01:01:40 -0800 Subject: [PATCH 2/2] Added tag v1.2.4 for changeset 84e91980936b --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index e662d62..c438a89 100644 --- a/.hgtags +++ b/.hgtags @@ -6,3 +6,4 @@ afda93e153f6f393f441d8f42a7d0f66ea8f061a v1.2 d24ec159f64442dd28774417295b2aa04bed76c6 v1.2.1 b352d73b652aadd3b9da064267d6f3fa26007c25 v1.2.2 e208549963dcd4ae89a18290aa598814c0b8eeb7 v1.2.3 +84e91980936bf85a854cee6881398cff9d27fce4 v1.2.4