Commit e1fb5367 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

We need to pass the unmasked state to

Wed May 21 12:52:01 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkkeyhash.[ch] (_gtk_key_hash_looku): We need
        to pass the unmasked state to gdk_keymap_translate_keyboard_state()
        to handle the case where a modifier not in the mask
        (like Num_Lock) changes the key value, so replace
        the masked state with a state/mask pair. (#106913,
        Olivier Ripoll)

        * gtk/gtkwindow.c gtk/gtkbinding.c: Update to pass
        in state/mask pair to _gtk_key_hash_lookup()
parent 534710de
Wed May 21 12:52:01 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkkeyhash.[ch] (_gtk_key_hash_looku): We need
to pass the unmasked state to gdk_keymap_translate_keyboard_state()
to handle the case where a modifier not in the mask
(like Num_Lock) changes the key value, so replace
the masked state with a state/mask pair. (#106913,
Olivier Ripoll)
* gtk/gtkwindow.c gtk/gtkbinding.c: Update to pass
in state/mask pair to _gtk_key_hash_lookup()
Tue May 20 21:58:00 2003 Hidetoshi Tajima <hidetoshi.tajima@sun.com>
* modules/input/gtkimcontextxim.c (xim_info_display_closed):
......
Wed May 21 12:52:01 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkkeyhash.[ch] (_gtk_key_hash_looku): We need
to pass the unmasked state to gdk_keymap_translate_keyboard_state()
to handle the case where a modifier not in the mask
(like Num_Lock) changes the key value, so replace
the masked state with a state/mask pair. (#106913,
Olivier Ripoll)
* gtk/gtkwindow.c gtk/gtkbinding.c: Update to pass
in state/mask pair to _gtk_key_hash_lookup()
Tue May 20 21:58:00 2003 Hidetoshi Tajima <hidetoshi.tajima@sun.com>
* modules/input/gtkimcontextxim.c (xim_info_display_closed):
......
Wed May 21 12:52:01 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkkeyhash.[ch] (_gtk_key_hash_looku): We need
to pass the unmasked state to gdk_keymap_translate_keyboard_state()
to handle the case where a modifier not in the mask
(like Num_Lock) changes the key value, so replace
the masked state with a state/mask pair. (#106913,
Olivier Ripoll)
* gtk/gtkwindow.c gtk/gtkbinding.c: Update to pass
in state/mask pair to _gtk_key_hash_lookup()
Tue May 20 21:58:00 2003 Hidetoshi Tajima <hidetoshi.tajima@sun.com>
* modules/input/gtkimcontextxim.c (xim_info_display_closed):
......
Wed May 21 12:52:01 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkkeyhash.[ch] (_gtk_key_hash_looku): We need
to pass the unmasked state to gdk_keymap_translate_keyboard_state()
to handle the case where a modifier not in the mask
(like Num_Lock) changes the key value, so replace
the masked state with a state/mask pair. (#106913,
Olivier Ripoll)
* gtk/gtkwindow.c gtk/gtkbinding.c: Update to pass
in state/mask pair to _gtk_key_hash_lookup()
Tue May 20 21:58:00 2003 Hidetoshi Tajima <hidetoshi.tajima@sun.com>
* modules/input/gtkimcontextxim.c (xim_info_display_closed):
......
Wed May 21 12:52:01 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkkeyhash.[ch] (_gtk_key_hash_looku): We need
to pass the unmasked state to gdk_keymap_translate_keyboard_state()
to handle the case where a modifier not in the mask
(like Num_Lock) changes the key value, so replace
the masked state with a state/mask pair. (#106913,
Olivier Ripoll)
* gtk/gtkwindow.c gtk/gtkbinding.c: Update to pass
in state/mask pair to _gtk_key_hash_lookup()
Tue May 20 21:58:00 2003 Hidetoshi Tajima <hidetoshi.tajima@sun.com>
* modules/input/gtkimcontextxim.c (xim_info_display_closed):
......
......@@ -1130,7 +1130,8 @@ _gtk_bindings_activate_event (GtkObject *object,
entries = _gtk_key_hash_lookup (key_hash,
event->hardware_keycode,
event->state & BINDING_MOD_MASK () & ~GDK_RELEASE_MASK,
event->state,
BINDING_MOD_MASK () & ~GDK_RELEASE_MASK,
event->group);
handled = gtk_bindings_activate_list (object, entries,
......
......@@ -307,6 +307,8 @@ sort_lookup_results (GSList *slist)
* @key_hash: a #GtkKeyHash
* @hardware_keycode: hardware keycode field from a #GdkEventKey
* @state: state field from a #GdkEventKey
* @mask: mask of modifiers to consider when matching against the
* modifiers in entries.
* @group: group field from a #GdkEventKey
*
* Looks up the best matching entry or entries in the hash table for
......@@ -322,6 +324,7 @@ GSList *
_gtk_key_hash_lookup (GtkKeyHash *key_hash,
guint16 hardware_keycode,
GdkModifierType state,
GdkModifierType mask,
gint group)
{
GHashTable *keycode_hash = key_hash_get_keycode_hash (key_hash);
......@@ -349,7 +352,7 @@ _gtk_key_hash_lookup (GtkKeyHash *key_hash,
{
GtkKeyHashEntry *entry = tmp_list->data;
if ((entry->modifiers & ~consumed_modifiers) == (state & ~consumed_modifiers))
if ((entry->modifiers & ~consumed_modifiers & mask) == (state & ~consumed_modifiers & mask))
{
gint i;
......
......@@ -39,6 +39,7 @@ void _gtk_key_hash_remove_entry (GtkKeyHash *key_hash,
GSList * _gtk_key_hash_lookup (GtkKeyHash *key_hash,
guint16 hardware_keycode,
GdkModifierType state,
GdkModifierType mask,
gint group);
GSList * _gtk_key_hash_lookup_keyval (GtkKeyHash *key_hash,
guint keyval,
......
......@@ -6751,7 +6751,8 @@ _gtk_window_activate_key (GtkWindow *window,
{
GSList *entries = _gtk_key_hash_lookup (key_hash,
event->hardware_keycode,
event->state & gtk_accelerator_get_default_mod_mask (),
event->state,
gtk_accelerator_get_default_mod_mask (),
event->group);
GSList *tmp_list;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment