diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-03-22 17:35:14 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-03-22 17:35:14 +0000 |
commit | 7425e428470e093e48b5039daf32c5c122a914db (patch) | |
tree | 9d987173bb77f3a60f10f6d789b71efbcf337d40 /gtk/gtkbindings.c | |
parent | abfed60cab0d6f9440430d05926b1e1e3d5b9cc9 (diff) | |
download | gdk-pixbuf-7425e428470e093e48b5039daf32c5c122a914db.tar.gz |
Partial fix for problem where keypad keys acted as shift-arrows in an
Fri Mar 22 11:29:11 2002 Owen Taylor <otaylor@redhat.com>
Partial fix for problem where keypad keys acted
as shift-arrows in an entry rather than arrows (#74327)
* gtk/gtkkeyhash.c (_gtk_key_hash_lookup): Sort lookup
results by number of modifiers in the entry. Fixes
problem where if a key matched both modified and unmodified
key bindings ... e.g., the distinguishing key binding
was consumed, then it was random which was used.
* gtk/gtkbindings.c (gtk_binding_entries_sort_patterns):
Catch the case where there are multiple entries from the
same bindingset (with different modifiers), and use only
the first entry, which, with the change in _gtk_key_hash_lookup()
Diffstat (limited to 'gtk/gtkbindings.c')
-rw-r--r-- | gtk/gtkbindings.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gtk/gtkbindings.c b/gtk/gtkbindings.c index abf473c46..6f1fed57a 100644 --- a/gtk/gtkbindings.c +++ b/gtk/gtkbindings.c @@ -954,8 +954,18 @@ gtk_binding_entries_sort_patterns (GSList *entries, gboolean is_release) { GSList *patterns; + GSList *tmp_list; patterns = NULL; + for (tmp_list = entries; tmp_list; tmp_list = tmp_list->next) + { + GtkBindingEntry *entry = tmp_list->data; + GtkBindingSet *binding_set; + + binding_set = entry->binding_set; + binding_set->current = NULL; + } + for (; entries; entries = entries->next) { GtkBindingEntry *entry = entries->data; @@ -966,6 +976,9 @@ gtk_binding_entries_sort_patterns (GSList *entries, continue; binding_set = entry->binding_set; + + if (binding_set->current) + continue; binding_set->current = entry; switch (path_id) |