Author: boiko
Date: Wed Feb 14 14:16:22 2007
New Revision: 120857

Added:
   
packages/updates/2007.0/x11-driver-input-keyboard/current/SOURCES/x11-driver-input-keyboard-leds_status.patch
Removed:
   
packages/updates/2007.0/x11-driver-input-keyboard/current/SOURCES/xf86-input-keyboard-1.0.1.3.tar.bz2
Modified:
   
packages/updates/2007.0/x11-driver-input-keyboard/current/SPECS/x11-driver-input-keyboard.spec

Log:
- add a patch fixing the led status when switching from one X session to another


Added: 
packages/updates/2007.0/x11-driver-input-keyboard/current/SOURCES/x11-driver-input-keyboard-leds_status.patch
==============================================================================
--- (empty file)
+++ 
packages/updates/2007.0/x11-driver-input-keyboard/current/SOURCES/x11-driver-input-keyboard-leds_status.patch
       Wed Feb 14 14:16:22 2007
@@ -0,0 +1,46 @@
+commit 05dd89ef03cee6853e7c2db518b6b22785cc3e7c
+Author: Samuel Thibault <[EMAIL PROTECTED]>
+Date:   Mon Feb 5 14:29:54 2007 -0800
+
+    Fix key led update
+    
+    Cf: https://bugs.freedesktop.org/show_bug.cgi?id=313
+        https://bugs.freedesktop.org/attachment.cgi?id=8396&action=view
+    
+     ------- Comment  #8 From Samuel Thibault  2007-01-14 14:28:16  [reply] 
-------
+    
+    Created an attachment (id=8396) [details]
+    fix key led update
+    
+    Ok, found the problem: when XKB is used (!pKbd->noXkb), pKbd->keyLeds is 
not
+    updated, so that UpdateLeds(), even if it called at the right places, 
actually
+    just clears all LEDs.  Here is a patch.
+
+diff --git a/src/kbd.c b/src/kbd.c
+index 7d402d5..24fe6f6 100644
+--- a/src/kbd.c
++++ b/src/kbd.c
+@@ -383,7 +383,22 @@ KbdCtrl( DeviceIntPtr device, KeybdCtrl 
+    InputInfoPtr pInfo = (InputInfoPtr) device->public.devicePrivate;
+    KbdDevPtr pKbd = (KbdDevPtr) pInfo->private;
+ 
+-   if ( ctrl->leds & XCOMP ) {
++   if ( ctrl->leds & XLED1) {
++       pKbd->keyLeds |= CAPSFLAG;
++   } else {
++       pKbd->keyLeds &= ~CAPSFLAG;
++   }
++   if ( ctrl->leds & XLED2) {
++       pKbd->keyLeds |= NUMFLAG;
++   } else {
++       pKbd->keyLeds &= ~NUMFLAG;
++   }
++   if ( ctrl->leds & XLED3) {
++       pKbd->keyLeds |= SCROLLFLAG;
++   } else {
++       pKbd->keyLeds &= ~SCROLLFLAG;
++   }
++   if ( ctrl->leds & (XCOMP|XLED4) ) {
+        pKbd->keyLeds |= COMPOSEFLAG;
+    } else {
+        pKbd->keyLeds &= ~COMPOSEFLAG;

Modified: 
packages/updates/2007.0/x11-driver-input-keyboard/current/SPECS/x11-driver-input-keyboard.spec
==============================================================================
--- 
packages/updates/2007.0/x11-driver-input-keyboard/current/SPECS/x11-driver-input-keyboard.spec
      (original)
+++ 
packages/updates/2007.0/x11-driver-input-keyboard/current/SPECS/x11-driver-input-keyboard.spec
      Wed Feb 14 14:16:22 2007
@@ -1,10 +1,11 @@
 Name: x11-driver-input-keyboard
 Version: 1.1.0
-Release: %mkrel 2
+Release: %mkrel 3
 Summary: Xorg input driver for keyboards
 Group: System/X11
 URL: http://xorg.freedesktop.org
 Source: 
http://xorg.freedesktop.org/releases/individual/driver/xf86-input-keyboard-%{version}.tar.bz2
+Patch0: x11-driver-input-keyboard-leds_status.patch
 License: MIT
 BuildRoot: %{_tmppath}/%{name}-root
 
@@ -23,6 +24,7 @@
 
 %prep
 %setup -q -n xf86-input-keyboard-%{version}
+%patch0 -p1 -b .leds
 
 %build
 %configure2_5x --x-includes=%{_includedir}\

Reply via email to