diff options
author | Boris Astardzhiev <boris.astardzhiev@gmail.com> | 2020-02-17 13:48:35 +0200 |
---|---|---|
committer | Alexander Schwinn <alexxcons@xfce.org> | 2020-02-17 17:55:40 +0100 |
commit | 6f85effe2336e4514d41f49ec53df168bca0132d (patch) | |
tree | c9b6b1834cabb1062c680f6c00b2ff212f61cca0 /src/xfdesktop-icon-view.c | |
parent | 27254aae7fe6b1311497001e1c2c4fc8076823b6 (diff) | |
download | xfdesktop-6f85effe2336e4514d41f49ec53df168bca0132d.tar.gz |
Ignore modifier key events in type-ahead find (Bug #11149)
Co-authored-by: Alexander Schwinn <alexxcons@xfce.org>
Diffstat (limited to 'src/xfdesktop-icon-view.c')
-rw-r--r-- | src/xfdesktop-icon-view.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/xfdesktop-icon-view.c b/src/xfdesktop-icon-view.c index cf1fab1f..774b3e08 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); + GdkModifierType 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; |