[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-input-keyboard: Changes to 'upstream-unstable'



 autogen.sh        |    4 +++-
 configure.ac      |    5 ++---
 man/kbd.man       |    2 +-
 src/Makefile.am   |    1 +
 src/at_scancode.c |    4 ++--
 src/kbd.c         |   23 +++++++++++++++++++++--
 src/sun_kbd.c     |   30 ++++++++++++++++++------------
 src/xf86OSKbd.h   |    4 ++++
 8 files changed, 52 insertions(+), 21 deletions(-)

New commits:
commit ec3ccb22d4e7348ac537100fcb1b7ddc07df57b8
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Mar 27 11:13:18 2013 +1000

    keyboard 1.7.0
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/configure.ac b/configure.ac
index 68b1b9e..c699f6e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-keyboard],
-        [1.6.2],
+        [1.7.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-keyboard])
 AC_CONFIG_SRCDIR([Makefile.am])

commit ad2a1dd1aa19999eb777f330242d46254b29b9cb
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Aug 17 14:07:12 2012 +1000

    Use sigsafe logging for keyboard debug messages
    
    This changes the log format to simple hex display, the server's signal-safe
    printf implementation doesn't handle %2.2x.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/at_scancode.c b/src/at_scancode.c
index 7209c20..a519a6c 100644
--- a/src/at_scancode.c
+++ b/src/at_scancode.c
@@ -112,8 +112,8 @@ ATScancode(InputInfoPtr pInfo, int *scanCode)
             case 0x36:
 	         return TRUE;
             default:
-                 xf86MsgVerb(X_INFO, 4, "Unreported Prefix0 scancode: 0x%02x\n",
-		             *scanCode);
+                 LogMessageVerbSigSafe(X_INFO, 4, "Unreported Prefix0 scancode: 0x%x\n",
+                                       *scanCode);
                  *scanCode += 0x78;
           }
        break;
diff --git a/src/kbd.c b/src/kbd.c
index 94523aa..9a013b7 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -410,9 +410,9 @@ PostKbdEvent(InputInfoPtr pInfo, unsigned int scanCode, Bool down)
   int state;
 
 #ifdef DEBUG
-  ErrorF("kbd driver rec scancode: 0x02%x %s\n", scanCode, down?"down":"up");
+  LogMessageVerbSigSafe(X_INFO, -1, "kbd driver rec scancode: 0x%x %s\n", scanCode, down ? "down" : "up");
 #endif
-	  
+
   /*
    * First do some special scancode remapping ...
    */
diff --git a/src/sun_kbd.c b/src/sun_kbd.c
index f1e530e..2e7add6 100644
--- a/src/sun_kbd.c
+++ b/src/sun_kbd.c
@@ -459,20 +459,22 @@ ReadInput(InputInfoPtr pInfo)
 		case EINTR:  /* Interrupted, try again */
 		    break;
 		case ENODEV: /* May happen when USB kbd is unplugged */
-		    /* We use X_NONE here because it doesn't alloc since we
-		       may be called from SIGIO handler */
-		    xf86MsgVerb(X_NONE, 0,
-				"%s: Device no longer present - removing.\n",
-				pInfo->name);
+		    /* We use X_NONE here because it didn't alloc since we
+		       may be called from SIGIO handler. No longer true for
+		       sigsafe logging, but matters for older servers  */
+		    LogMessageVerbSigSafe(X_NONE, 0,
+					  "%s: Device no longer present - removing.\n",
+					  pInfo->name);
 		    xf86RemoveEnabledDevice(pInfo);
 		    priv->remove_timer = TimerSet(priv->remove_timer, 0, 1,
 						  RemoveKeyboard, pInfo);
 		    return;
 		default:     /* All other errors */
-		    /* We use X_NONE here because it doesn't alloc since we
-		       may be called from SIGIO handler */
-		    xf86MsgVerb(X_NONE, 0, "%s: Read error: %s\n", pInfo->name,
-				strerror(errno));
+		    /* We use X_NONE here because it didn't alloc since we
+		       may be called from SIGIO handler. No longer true for
+		       sigsafe logging, but matters for older servers  */
+		    LogMessageVerbSigSafe(X_NONE, 0, "%s: Read error: %s\n", pInfo->name,
+					  strerror(errno));
 		    return;
 	    }
 	} else { /* nBytes == 0, so nothing more to read */
diff --git a/src/xf86OSKbd.h b/src/xf86OSKbd.h
index cba049f..0d8792d 100644
--- a/src/xf86OSKbd.h
+++ b/src/xf86OSKbd.h
@@ -29,6 +29,10 @@
 
 #include "xf86Xinput.h"
 
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 18
+#define LogMessageVerbSigSafe xf86MsgVerb
+#endif
+
 Bool ATScancode(InputInfoPtr pInfo, int *scanCode);
 
 /* Public interface to OS-specific keyboard support. */

commit 4a954bc6a8fbc4aa50dfcabec011274252713204
Author: Colin Walters <walters@verbum.org>
Date:   Wed Jan 4 17:37:06 2012 -0500

    autogen.sh: Implement GNOME Build API
    
    http://people.gnome.org/~walters/docs/build-api.txt
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

diff --git a/autogen.sh b/autogen.sh
index 904cd67..fc34bd5 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -9,4 +9,6 @@ cd $srcdir
 autoreconf -v --install || exit 1
 cd $ORIGDIR || exit $?
 
-$srcdir/configure --enable-maintainer-mode "$@"
+if test -z "$NOCONFIGURE"; then
+    $srcdir/configure "$@"
+fi

commit 9522f28a8f90680942e42902678c963c6981b0d1
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Jan 16 13:11:11 2013 -0500

    configure: Drop AM_MAINTAINER_MODE
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

diff --git a/configure.ac b/configure.ac
index 8ae762f..68b1b9e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,7 +32,6 @@ AC_CONFIG_AUX_DIR(.)
 
 # Initialize Automake
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
-AM_MAINTAINER_MODE
 
 # Initialize libtool
 AC_DISABLE_STATIC

commit 6e51df6dd4255cbe311ec98e21a1cc94975271a1
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Mon Jul 23 22:04:45 2012 -0700

    xf86-input-keyboard 1.6.2
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/configure.ac b/configure.ac
index 7555b44..8ae762f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-input-keyboard],
-        [1.6.1],
+        [1.6.2],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-input-keyboard])
 AC_CONFIG_SRCDIR([Makefile.am])

commit 8d3edb688115d3100d7ac6fa9ed407494e435c43
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu May 24 21:36:17 2012 -0700

    Link with $(XORG_LIBS) to support no-undefined linking
    
    Will be empty on most platforms, set to the -z parent=Xorg flag on
    Solaris if building with the support for enforcing no undefined symbols.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/Makefile.am b/src/Makefile.am
index 4062f95..d5d3ef4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,6 +23,7 @@ AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS)
 kbd_drv_la_LTLIBRARIES = kbd_drv.la
 kbd_drv_la_LDFLAGS = -avoid-version -module
 kbd_drv_la_SOURCES = kbd.c xf86OSKbd.h xf86Keymap.h atKeynames.h
+kbd_drv_la_LIBADD = $(XORG_LIBS)
 kbd_drv_ladir = @inputdir@
 
 BSD_SRCS = bsd_KbdMap.c bsd_kbd.c bsd_kbd.h at_scancode.c

commit dd6f110c4568dc0922bae47530906b01396e2d41
Author: François Tigeot <ftigeot@wolfpond.org>
Date:   Sat May 5 13:12:10 2012 +0200

    Recognize DragonFly as a BSD system.
    
    This patch has actually been present for more than 4 years in the
    pkgsrc tree.
    
    Originally-from: Jörg Sonnenberger
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/configure.ac b/configure.ac
index 4245955..7555b44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,7 +62,7 @@ case $host_os in
     IS_LINUX="yes"
     ;;
 
-  freebsd* | kfreebsd-gnu* | netbsd* | openbsd*)
+  freebsd* | kfreebsd-gnu* | netbsd* | openbsd* | dragonfly*)
     IS_BSD="yes"
     ;;
 

commit da5ccb256acf6cbb817d68499e0d9f533f750628
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Mon Apr 30 19:34:44 2012 -0700

    Solaris: ensure "Device" option is set, even if HAL didn't set it for us
    
    Handles fallback to default /dev/kbd when AutoAddDevices is False and
    Device option is not manually set in xorg.conf, so that xinput device
    node property can be correctly set to it.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/sun_kbd.c b/src/sun_kbd.c
index 5f7b5c6..f1e530e 100644
--- a/src/sun_kbd.c
+++ b/src/sun_kbd.c
@@ -497,6 +497,8 @@ OpenKeyboard(InputInfoPtr pInfo)
 		    kbdPath);
 	pInfo->read_input = ReadInput;
 	ret = TRUE;
+	/* in case it wasn't set and we fell back to default */
+	xf86ReplaceStrOption(pInfo->options, "Device", kbdPath);
     }
 
     free(kbdPath);

commit e63cb5ecc5ab7239c9c285920244cc89e5853920
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Apr 27 17:51:22 2012 -0700

    Set XI_PROP_DEVICE_NODE property to string from "Device" option
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Alexandr Shadchin <alexandr.shadchin@gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/man/kbd.man b/man/kbd.man
index c8d70cc..b1bd082 100644
--- a/man/kbd.man
+++ b/man/kbd.man
@@ -40,7 +40,7 @@ are supported:
 .TP 7
 .BI "Option \*qDevice\*q \*q" string \*q
 Specify the keyboard device.  Default: the OS's default console keyboard
-input source.
+input source.  Property: "Device Node" (read-only).
 .TP 7
 .BI "Option \*qProtocol\*q \*q" string \*q
 Specify the keyboard protocol.  Valid protocol types include:
diff --git a/src/kbd.c b/src/kbd.c
index e04c340..94523aa 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -38,6 +38,10 @@
 #include "xf86OSKbd.h"
 #include "compiler.h"
 
+#include "exevents.h"
+#include <X11/Xatom.h>
+#include "xserver-properties.h"
+
 #include "xkbstr.h"
 #include "xkbsrv.h"
 
@@ -328,6 +332,21 @@ KbdProc(DeviceIntPtr device, int what)
                  return BadValue;
              }
          }
+# ifdef XI_PROP_DEVICE_NODE
+         {
+             const char *device_node =
+                 xf86CheckStrOption(pInfo->options, "Device", NULL);
+
+             if (device_node)
+             {
+                 Atom prop_device = MakeAtom(XI_PROP_DEVICE_NODE,
+                                             strlen(XI_PROP_DEVICE_NODE), TRUE);
+                 XIChangeDeviceProperty(device, prop_device, XA_STRING, 8,
+                                        PropModeReplace, strlen(device_node),
+                                        device_node, FALSE);
+             }
+         }
+# endif /* XI_PROP_DEVICE_NODE */
 #else
          {
              XkbComponentNamesRec xkbnames;

commit ed35abe0da1a9134ee126df88608b33892ae4313
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Wed Jan 18 18:13:08 2012 -0800

    Solaris: Use uchar_t, not int, for led masks in KIOCSLED/KIOCGLED ioctls
    
    Avoids checking/setting the wrong bits on big endian machines like SPARC.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/src/sun_kbd.c b/src/sun_kbd.c
index a240087..5f7b5c6 100644
--- a/src/sun_kbd.c
+++ b/src/sun_kbd.c
@@ -70,8 +70,9 @@ static void
 sunKbdSetLeds(InputInfoPtr pInfo, int leds)
 {
     int i;
+    uchar_t setleds = (uchar_t) (leds & 0xFF);
 
-    SYSCALL(i = ioctl(pInfo->fd, KIOCSLED, &leds));
+    SYSCALL(i = ioctl(pInfo->fd, KIOCSLED, &setleds));
     if (i < 0) {
 	xf86Msg(X_ERROR, "%s: Failed to set keyboard LED's: %s\n",
                 pInfo->name, strerror(errno));
@@ -82,14 +83,15 @@ sunKbdSetLeds(InputInfoPtr pInfo, int leds)
 static int
 sunKbdGetLeds(InputInfoPtr pInfo)
 {
-    int i, leds = 0;
+    int i;
+    uchar_t leds = 0;
 
     SYSCALL(i = ioctl(pInfo->fd, KIOCGLED, &leds));
     if (i < 0) {
         xf86Msg(X_ERROR, "%s: Failed to get keyboard LED's: %s\n",
                 pInfo->name, strerror(errno));
     }
-    return leds;
+    return (int) leds;
 }
 
 


Reply to: