[PATCH v2] kdrive/evdev: update keyboard LEDs (#22302)
Laércio de Sousa
laerciosousa at sme-mogidascruzes.sp.gov.br
Mon Feb 22 19:04:12 UTC 2016
Implement missing parts in kdrive evdev driver for
correct update of evdev keyboard LEDs.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=22302
Signed-off-by: Laércio de Sousa <laerciosousa at sme-mogidascruzes.sp.gov.br>
---
hw/kdrive/linux/evdev.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/hw/kdrive/linux/evdev.c b/hw/kdrive/linux/evdev.c
index cdd45e7..a5b5954 100644
--- a/hw/kdrive/linux/evdev.c
+++ b/hw/kdrive/linux/evdev.c
@@ -442,10 +442,13 @@ EvdevKbdEnable(KdKeyboardInfo * ki)
static void
EvdevKbdLeds(KdKeyboardInfo * ki, int leds)
{
-/* struct input_event event;
+ struct input_event event;
Kevdev *ke;
- ki->driverPrivate = ke;
+ ke = ki->driverPrivate;
+
+ if (!ki || !ke)
+ return;
memset(&event, 0, sizeof(event));
@@ -468,7 +471,6 @@ EvdevKbdLeds(KdKeyboardInfo * ki, int leds)
event.code = LED_COMPOSE;
event.value = leds & (1 << 3) ? 1 : 0;
write(ke->fd, (char *) &event, sizeof(event));
-*/
}
static void
--
2.5.0
More information about the xorg-devel
mailing list