diff options
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 7330784de..8ff4528a1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -555,8 +555,9 @@ void nxagentChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl) for (int i = 1; i <= 32; i++) { + unsigned int mask = (unsigned int)1 << (i - 1); values.led = i; - values.led_mode = (ctrl->leds & (1 << (i - 1))) ? LedModeOn : LedModeOff; + values.led_mode = (ctrl->leds & mask) ? LedModeOn : LedModeOff; XChangeKeyboardControl(nxagentDisplay, value_mask, &values); } |