summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--ChangeLog.pre-2-1012
-rw-r--r--ChangeLog.pre-2-412
-rw-r--r--ChangeLog.pre-2-612
-rw-r--r--ChangeLog.pre-2-812
-rw-r--r--gtk/gtkbindings.c3
-rw-r--r--gtk/gtkkeyhash.c5
-rw-r--r--gtk/gtkkeyhash.h1
-rw-r--r--gtk/gtkwindow.c3
9 files changed, 69 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 97801a14a5..f0fa0c5089 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+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):
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 97801a14a5..f0fa0c5089 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,15 @@
+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):
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 97801a14a5..f0fa0c5089 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,15 @@
+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):
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 97801a14a5..f0fa0c5089 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,15 @@
+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):
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 97801a14a5..f0fa0c5089 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,15 @@
+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):
diff --git a/gtk/gtkbindings.c b/gtk/gtkbindings.c
index efb4ea08c5..b5cacbea3d 100644
--- a/gtk/gtkbindings.c
+++ b/gtk/gtkbindings.c
@@ -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,
diff --git a/gtk/gtkkeyhash.c b/gtk/gtkkeyhash.c
index 659461c19f..604c9ccd7b 100644
--- a/gtk/gtkkeyhash.c
+++ b/gtk/gtkkeyhash.c
@@ -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;
diff --git a/gtk/gtkkeyhash.h b/gtk/gtkkeyhash.h
index d02c9f5f66..cbc6679b10 100644
--- a/gtk/gtkkeyhash.h
+++ b/gtk/gtkkeyhash.h
@@ -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,
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 3e2ba8c83f..082299a0c1 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -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;