summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@freedesktop.org>2008-12-31 12:40:02 -0800
committerJeremy Huddleston <jeremyhu@freedesktop.org>2008-12-31 12:45:31 -0800
commit0676a580fcc05d54049269028a34358935a4101c (patch)
treec8e24eb60d8f339cd99901a5dbc13e5f2b8a3bcf
parent0d2621b6d4684ec62e67156a5a9dbdd3297f9cb0 (diff)
XQuartz: Don't use NX_SECONDARYFNMASK, NX_NUMERICPADMASK, NX_HELPMASK
We don't have keycodes for them, so don't try to use them (cherry picked from commit cb912aca3a2834c4ad8e386c8a0d05c1bb31b0e7)
-rw-r--r--hw/xquartz/X11Application.m7
-rw-r--r--hw/xquartz/darwinEvents.c11
2 files changed, 8 insertions, 10 deletions
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index cd5ab5c2b..2cebd2aff 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -977,13 +977,6 @@ static inline int ensure_flag(int flags, int device_independent, int device_depe
977 977
978 modifierFlags = [e modifierFlags]; 978 modifierFlags = [e modifierFlags];
979 979
980 /* These are the "only" modifier keys we care about */
981 modifierFlags &= (NX_COMMANDMASK | NX_CONTROLMASK | NX_ALTERNATEMASK | NX_SHIFTMASK |
982 NX_SECONDARYFNMASK | NX_ALPHASHIFTMASK | NX_NUMERICPADMASK |
983 NX_HELPMASK | NX_DEVICELCTLKEYMASK | NX_DEVICELSHIFTKEYMASK |
984 NX_DEVICERSHIFTKEYMASK | NX_DEVICELCMDKEYMASK | NX_DEVICERCMDKEYMASK |
985 NX_DEVICELALTKEYMASK | NX_DEVICERALTKEYMASK | NX_DEVICERCTLKEYMASK);
986
987#ifdef NX_DEVICELCMDKEYMASK 980#ifdef NX_DEVICELCMDKEYMASK
988 /* This is to workaround a bug in the VNC server where we sometimes see the L 981 /* This is to workaround a bug in the VNC server where we sometimes see the L
989 * modifier and sometimes see no "side" 982 * modifier and sometimes see no "side"
diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c
index 7fc390d1e..37f0bfb45 100644
--- a/hw/xquartz/darwinEvents.c
+++ b/hw/xquartz/darwinEvents.c
@@ -146,7 +146,6 @@ static void DarwinPressModifierKey(int pressed, int key) {
146 */ 146 */
147 147
148static int modifier_mask_list[] = { 148static int modifier_mask_list[] = {
149 NX_SECONDARYFNMASK, NX_NUMERICPADMASK, NX_HELPMASK,
150#ifdef NX_DEVICELCMDKEYMASK 149#ifdef NX_DEVICELCMDKEYMASK
151 NX_DEVICELCTLKEYMASK, NX_DEVICERCTLKEYMASK, 150 NX_DEVICELCTLKEYMASK, NX_DEVICERCTLKEYMASK,
152 NX_DEVICELSHIFTKEYMASK, NX_DEVICERSHIFTKEYMASK, 151 NX_DEVICELSHIFTKEYMASK, NX_DEVICERSHIFTKEYMASK,
@@ -163,6 +162,7 @@ static void DarwinUpdateModifiers(
163 int flags ) // modifier flags that have changed 162 int flags ) // modifier flags that have changed
164{ 163{
165 int *f; 164 int *f;
165 int key;
166 166
167 /* Capslock is special. This mask is the state of capslock (on/off), 167 /* Capslock is special. This mask is the state of capslock (on/off),
168 * not the state of the button. Hopefully we can find a better solution. 168 * not the state of the button. Hopefully we can find a better solution.
@@ -173,8 +173,13 @@ static void DarwinUpdateModifiers(
173 } 173 }
174 174
175 for(f=modifier_mask_list; *f; f++) 175 for(f=modifier_mask_list; *f; f++)
176 if(*f & flags) 176 if(*f & flags) {
177 DarwinPressModifierKey(pressed, DarwinModifierNXMaskToNXKey(*f)); 177 key = DarwinModifierNXMaskToNXKey(*f);
178 if(key == -1)
179 ErrorF("DarwinUpdateModifiers: Unsupported NXMask: 0x%x\n", *f);
180 else
181 DarwinPressModifierKey(pressed, key);
182 }
178} 183}
179 184
180/* Generic handler for Xquartz-specifc events. When possible, these should 185/* Generic handler for Xquartz-specifc events. When possible, these should