From 7bf2901a35c77eba71f739730254f16d35c5b0af Mon Sep 17 00:00:00 2001 From: Boris Astardzhiev Date: Mon, 17 Feb 2020 13:48:35 +0200 Subject: [PATCH] Ignore modifier key events in type-ahead find icons feature as noted by Theo Linkspfeifer (Bug #11149) --- src/xfdesktop-icon-view.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c index cf1fab1f..d994ff75 100644 --- a/src/xfdesktop-icon-view.c +++ b/src/xfdesktop-icon-view.c @@ -1137,12 +1137,15 @@ xfdesktop_icon_view_key_press(GtkWidget *widget, * so we have to activate the bindings manually */ ret = gtk_bindings_activate_event(G_OBJECT(icon_view), evt); if(ret == FALSE) { - /* Binding not found, now inspect the pressed character. - * Let's try to find an icon starting with this character and make - * the icon selected. */ - guint32 unicode = gdk_keyval_to_unicode(evt->keyval); - if(unicode && g_unichar_isgraph(unicode) == TRUE) - xfdesktop_icon_view_type_ahead_find_icon(icon_view, evt); + guint ignore_modifiers = gtk_accelerator_get_default_mod_mask(); + if((evt->state & ignore_modifiers) == 0) { + /* Binding not found and key press is not part of a combo. + * Now inspect the pressed character. Let's try to find an + * icon starting with this character and make the icon selected. */ + guint32 unicode = gdk_keyval_to_unicode(evt->keyval); + if(unicode && g_unichar_isgraph(unicode) == TRUE) + xfdesktop_icon_view_type_ahead_find_icon(icon_view, evt); + } } return ret; -- 2.20.1