Using MASK_ macros in a few more places.

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1218 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Peter Åstrand 2006-04-07 22:20:43 +00:00
parent ffb111b2a1
commit 54587760ed

View File

@ -612,18 +612,18 @@ xkeymap_translate_key(uint32 keysym, unsigned int keycode, unsigned int state)
tr = *ptr; tr = *ptr;
if (tr.seq_keysym == 0) /* Normal scancode translation */ if (tr.seq_keysym == 0) /* Normal scancode translation */
{ {
if (tr.modifiers & MapInhibitMask) if (MASK_HAS_BITS(tr.modifiers, MapInhibitMask))
{ {
DEBUG_KBD(("Inhibiting key\n")); DEBUG_KBD(("Inhibiting key\n"));
tr.scancode = 0; tr.scancode = 0;
return tr; return tr;
} }
if (tr.modifiers & MapLocalStateMask) if (MASK_HAS_BITS(tr.modifiers, MapLocalStateMask))
{ {
/* The modifiers to send for this key should be obtained /* The modifiers to send for this key should be obtained
from the local state. Currently, only shift is implemented. */ from the local state. Currently, only shift is implemented. */
if (state & ShiftMask) if (MASK_HAS_BITS(state, ShiftMask))
{ {
tr.modifiers = MapLeftShiftMask; tr.modifiers = MapLeftShiftMask;
} }
@ -661,7 +661,7 @@ xkeymap_translate_key(uint32 keysym, unsigned int keycode, unsigned int state)
/* The modifiers to send for this key should be /* The modifiers to send for this key should be
obtained from the local state. Currently, only obtained from the local state. Currently, only
shift is implemented. */ shift is implemented. */
if (state & ShiftMask) if (MASK_HAS_BITS(state, ShiftMask))
{ {
tr.modifiers = MapLeftShiftMask; tr.modifiers = MapLeftShiftMask;
} }