[gtk+/gtk-3-2] x11: Fix first call to _gdk_x11_keymap_key_is_modifier()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-2] x11: Fix first call to _gdk_x11_keymap_key_is_modifier()
- Date: Sun, 19 Feb 2012 16:42:34 +0000 (UTC)
commit ede5591df0aaacb975d1f035f129205b8644332f
Author: Bastien Nocera <hadess hadess net>
Date: Sun Feb 19 16:43:33 2012 +0100
x11: Fix first call to _gdk_x11_keymap_key_is_modifier()
_gdk_x11_keymap_key_is_modifier() never tries to set min/max_keycode
if they haven't been set before, meaning that until another function
sets those, all the keys will be seen as non-modifiers.
This causes GdkKeyEvents to be wrongly tagged with "->is_modifier = 0"
when in actual fact the key is a modifier. This fixes keyboard
shortcuts captured with GtkCellRendererAccel in "raw" mode thinking
a modifier without any actual keys is a valid shortcut.
https://bugzilla.gnome.org/show_bug.cgi?id=670400
Conflicts:
gdk/x11/gdkkeys-x11.c
gdk/x11/gdkkeys-x11.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gdk/x11/gdkkeys-x11.c b/gdk/x11/gdkkeys-x11.c
index 80bf711..c64c426 100644
--- a/gdk/x11/gdkkeys-x11.c
+++ b/gdk/x11/gdkkeys-x11.c
@@ -1544,6 +1544,7 @@ _gdk_x11_keymap_key_is_modifier (GdkKeymap *keymap,
keymap = GET_EFFECTIVE_KEYMAP (keymap);
keymap_x11 = GDK_X11_KEYMAP (keymap);
+ update_keyrange (keymap_x11);
if (keycode < keymap_x11->min_keycode ||
keycode > keymap_x11->max_keycode)
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]