[PATCH v2 keyboard 2/3] Removed useless leds (member structure KbdDevRec)

Alexandr Shadchin alexandr.shadchin at gmail.com
Sun Feb 20 07:44:05 PST 2011


Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin at gmail.com>
---
 src/kbd.c       |    8 ++------
 src/xf86OSKbd.h |    1 -
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/kbd.c b/src/kbd.c
index 86b5be5..e0d55e5 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -220,14 +220,12 @@ UpdateLeds(InputInfoPtr pInfo)
         pKbd->keyLeds & MODEFLAG)    leds |= XLED3;
     if (pKbd->keyLeds & COMPOSEFLAG) leds |= XLED4;
 
-    pKbd->leds = leds;
-    pKbd->SetLeds(pInfo, pKbd->leds);
+    pKbd->SetLeds(pInfo, leds);
 }
 
 static void
 KbdCtrl( DeviceIntPtr device, KeybdCtrl *ctrl)
 {
-   unsigned long leds;
    InputInfoPtr pInfo = (InputInfoPtr) device->public.devicePrivate;
    KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
 
@@ -251,9 +249,7 @@ KbdCtrl( DeviceIntPtr device, KeybdCtrl *ctrl)
    } else {
        pKbd->keyLeds &= ~COMPOSEFLAG;
    }
-   leds = ctrl->leds & ~(XCAPS | XNUM | XSCR); /* ??? */
-   pKbd->leds = leds;
-  pKbd->SetLeds(pInfo, pKbd->leds);
+  pKbd->SetLeds(pInfo, ctrl->leds);
 }
 
 static void
diff --git a/src/xf86OSKbd.h b/src/xf86OSKbd.h
index f94f177..1c8d764 100644
--- a/src/xf86OSKbd.h
+++ b/src/xf86OSKbd.h
@@ -65,7 +65,6 @@ typedef struct {
     OpenKeyboardProc	OpenKeyboard;
     PostEventProc	PostEvent;
 
-    unsigned long	leds;
     unsigned long	keyLeds;
     int			scanPrefix;
     Bool		CustomKeycodes;
-- 
1.7.3.5



More information about the xorg-devel mailing list