Fix keyboard indicators

This commit is contained in:
David Reveman 2006-05-05 09:43:55 +00:00
parent 54bf65fcbd
commit 2fb8f16e8b
2 changed files with 31 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2006-05-05 David Reveman <davidr@novell.com>
* hw/xgl/glx/xglx.c (xglxKbdCtrl): No need to go through more than
the first 4 leds.
(xglxKeybdProc): Turn off automatic indicator changes and make
sure audible bell is turned on.
2006-04-26 David Reveman <davidr@novell.com>
* hw/xgl/glx/xglx.c: Fix SetCursorPosition, events were not generated

View file

@ -1078,11 +1078,10 @@ xglxKbdCtrl (DeviceIntPtr pDev,
valueMask = KBLed | KBLedMode;
for (i = 1; i <= 32; i++)
for (i = 0; i < 5; i++)
{
values.led = i;
values.led_mode = (ctrl->leds & (1 << (i - 1))) ? LedModeOn :
LedModeOff;
values.led = i + 1;
values.led_mode = (ctrl->leds & (1 << i)) ? LedModeOn : LedModeOff;
XChangeKeyboardControl (xdisplay, valueMask, &values);
}
@ -1234,6 +1233,27 @@ xglxKeybdProc (DeviceIntPtr pDevice,
XkbFreeKeyboard (desc, 0, False);
}
if (ret)
{
desc = XkbAllocKeyboard ();
if (desc)
{
XkbGetIndicatorMap (xdisplay, XkbAllIndicatorsMask, desc);
for (i = 0; i < XkbNumIndicators; i++)
if (desc->indicators->phys_indicators & (1 << i))
desc->indicators->maps[i].flags = XkbIM_NoAutomatic;
XkbSetIndicatorMap (xdisplay, ~0, desc);
XkbFreeKeyboard (desc, 0, True);
}
XkbChangeEnabledControls (xdisplay,
XkbUseCoreKbd,
XkbAudibleBellMask,
XkbAudibleBellMask);
}
}
#endif