[PATCH v2 keyboard 1/3] Removed option XLeds

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


IMHO nobody needs because it works not correctly and still not fixed

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

diff --git a/man/kbd.man b/man/kbd.man
index 4fb2336..b7d57d5 100644
--- a/man/kbd.man
+++ b/man/kbd.man
@@ -53,13 +53,6 @@ Standard, Xqueue.
 Not all protocols are supported on all platforms.  Default: "Standard".
 .RE
 .TP 7
-.BI "Option \*qXLeds\*q \*q" ledlist \*q
-makes the keyboard LEDs specified in
-.I ledlist
-available for client use instead of their traditional function
-(Scroll Lock, Caps Lock and Num Lock).  The numbers in the list are
-in the range 1 to 3.  Default: empty list.
-.TP 7
 .BI "Option \*qXkbRules\*q \*q" rules \*q
 specifies which XKB rules file to use for interpreting the
 .BR XkbModel ,
diff --git a/src/kbd.c b/src/kbd.c
index d89d234..86b5be5 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -141,7 +141,6 @@ KbdPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
 #endif
 {
     KbdDevPtr pKbd;
-    char *s;
     const char **defaults;
     int rc = Success;
 
@@ -187,22 +186,6 @@ KbdPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
         goto out;
     }
 
-    if ((s = xf86SetStrOption(pInfo->options, "XLeds", NULL))) {
-        char *l, *end;
-        unsigned int i;
-        l = strtok(s, " \t\n");
-        while (l) {
-    	    i = strtoul(l, &end, 0);
-    	    if (*end == '\0')
-    	        pKbd->xledsMask |= 1L << (i - 1);
-    	    else {
-    	        xf86Msg(X_ERROR, "\"%s\" is not a valid XLeds value", l);
-    	    }
-    	    l = strtok(NULL, " \t\n");
-        }
-        free(s);
-    }
-
     xkb_rules = xf86SetStrOption(pInfo->options, "XkbRules", NULL);
     xkb_model = xf86SetStrOption(pInfo->options, "XkbModel", NULL);
     xkb_layout = xf86SetStrOption(pInfo->options, "XkbLayout", NULL);
@@ -237,7 +220,7 @@ UpdateLeds(InputInfoPtr pInfo)
         pKbd->keyLeds & MODEFLAG)    leds |= XLED3;
     if (pKbd->keyLeds & COMPOSEFLAG) leds |= XLED4;
 
-    pKbd->leds = (pKbd->leds & pKbd->xledsMask) | (leds & ~pKbd->xledsMask);
+    pKbd->leds = leds;
     pKbd->SetLeds(pInfo, pKbd->leds);
 }
 
diff --git a/src/xf86OSKbd.h b/src/xf86OSKbd.h
index cba049f..f94f177 100644
--- a/src/xf86OSKbd.h
+++ b/src/xf86OSKbd.h
@@ -66,7 +66,6 @@ typedef struct {
     PostEventProc	PostEvent;
 
     unsigned long	leds;
-    unsigned long	xledsMask;
     unsigned long	keyLeds;
     int			scanPrefix;
     Bool		CustomKeycodes;
-- 
1.7.3.5



More information about the xorg-devel mailing list