[arch-commits] Commit in xorg-server/repos (3 files)

Jan de Groot jgc at archlinux.org
Sat Dec 6 11:53:29 UTC 2008


    Date: Saturday, December 6, 2008 @ 06:53:29
  Author: jgc
Revision: 20699

Merged revisions 20587 via svnmerge from 
svn+ssh://svn.archlinux.org/srv/svn-packages/xorg-server/trunk

........
  r20587 | jgc | 2008-12-05 21:18:39 +0000 (Fri, 05 Dec 2008) | 2 lines
  
  Fix FS#12248
........

Added:
  xorg-server/repos/extra-x86_64/xserver-1.5.0-force-SwitchCoreKeyboard-for-evdev.patch
    (from rev 20587, xorg-server/trunk/xserver-1.5.0-force-SwitchCoreKeyboard-for-evdev.patch)
Modified:
  xorg-server/repos/extra-x86_64/	(properties)
  xorg-server/repos/extra-x86_64/PKGBUILD

--------------------------------------------------------+
 PKGBUILD                                               |    8 +
 xserver-1.5.0-force-SwitchCoreKeyboard-for-evdev.patch |   69 +++++++++++++++
 2 files changed, 75 insertions(+), 2 deletions(-)


Property changes on: xorg-server/repos/extra-x86_64
___________________________________________________________________
Modified: svnmerge-integrated
   - /xorg-server/trunk:1-20108
   + /xorg-server/trunk:1-20698

Modified: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD	2008-12-06 11:32:56 UTC (rev 20698)
+++ extra-x86_64/PKGBUILD	2008-12-06 11:53:29 UTC (rev 20699)
@@ -4,7 +4,7 @@
 
 pkgname=xorg-server
 pkgver=1.5.3
-pkgrel=2
+pkgrel=3
 pkgdesc="X.Org X servers"
 arch=('i686' 'x86_64')
 license=('custom')
@@ -17,7 +17,8 @@
 install=xorg-server.install
 source=(${url}/releases/individual/xserver/${pkgname}-${pkgver}.tar.bz2
 	001_fedora_extramodes.patch
-	xorg-redhat-die-ugly-pattern-die-die-die.patch)
+	xorg-redhat-die-ugly-pattern-die-die-die.patch
+	xserver-1.5.0-force-SwitchCoreKeyboard-for-evdev.patch)
 md5sums=('308971036e25250e7fe3cccfd5a120f8'
          '033427f2b406cba8dd6103ff374e7156'
          '1a336eb22e27cbf443ec5a2ecddfa93c')
@@ -30,6 +31,9 @@
   # Get rid of the ugly pattern
   patch -Np3 -i "${srcdir}/xorg-redhat-die-ugly-pattern-die-die-die.patch" || return 1
 
+  # Patch from Fedora to fix FS#12248
+  patch -Np1 -i "${srcdir}/xserver-1.5.0-force-SwitchCoreKeyboard-for-evdev.patch" || return 1
+
   # Fix dbus config path
   sed -i -e 's/\$(sysconfdir)/\/etc/' config/Makefile.*  || return 1
 

Copied: xorg-server/repos/extra-x86_64/xserver-1.5.0-force-SwitchCoreKeyboard-for-evdev.patch (from rev 20587, xorg-server/trunk/xserver-1.5.0-force-SwitchCoreKeyboard-for-evdev.patch)
===================================================================
--- extra-x86_64/xserver-1.5.0-force-SwitchCoreKeyboard-for-evdev.patch	                        (rev 0)
+++ extra-x86_64/xserver-1.5.0-force-SwitchCoreKeyboard-for-evdev.patch	2008-12-06 11:53:29 UTC (rev 20699)
@@ -0,0 +1,69 @@
+From 638cab7e1dc3711f7fb04155bcdabf4b8895cc5e Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer at who-t.net>
+Date: Mon, 4 Aug 2008 17:08:36 +0930
+Subject: [PATCH] xfree86: force SwitchCoreKeyboard for evdev devices (updated).
+
+If an evdev keyboard device is added through the HAL mechanism, force a
+SwitchCoreKeyboard to load the evdev map into the VCK. This way, by the time a
+client starts the evdev keymap is already there, leading to less pain lateron.
+
+Works if:
+- all keyboards are hotplugged through HAL, and/or
+- the xorg.conf keyboard uses the kbd driver.
+
+Has no effect (i.e. busted keymaps) if:
+- an evdev keyboard device has been specified in the xorg.conf.
+- we don't have a device at startup and plug a device in after starting the
+  desktop environment.
+- if the device we use isn't the first one reported by HAL.
+
+If HAL isn't set up, this patch is a noop.
+---
+ hw/xfree86/common/xf86Xinput.c |   31 +++++++++++++++++++++++++++++++
+ 1 files changed, 31 insertions(+), 0 deletions(-)
+
+diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
+index 710e787..dacc3dc 100644
+--- a/hw/xfree86/common/xf86Xinput.c
++++ b/hw/xfree86/common/xf86Xinput.c
+@@ -423,6 +423,37 @@ NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev)
+         (!is_auto || xf86Info.autoEnableDevices))
+         EnableDevice(dev);
+ 
++    /* XXX: The VCK always starts with built-in defaults for keymap. These
++     * defaults are different to the evdev ones. When the first key is hit on
++     * an extension device, the keymap is copied into the VCK's and any
++     * changes made at runtime to the VCK map are lost.
++     *
++     * Assumption: if we have at least one evdev keyboard device, we can
++     * ignore kbd devices. Force a SwitchCoreKeyboard so the VCK has the same
++     * keymap as we do.
++     *
++     * Next time we hit a key, we don't change the map over anymore (see
++     * SwitchCoreKeyboard), and live happily ever after.
++     * Until we have 2 physical keyboards. Or the first real keyboard isn't
++     * actually the one we use. Oh well.
++     *
++     */
++    if (dev->key)
++    {
++        InputInfoPtr info;
++
++        /* Search if there is one other keyboard that uses evdev. */
++        for (info = xf86InputDevs; info; info = info->next)
++        {
++            if (info != pInfo && info->dev && info->dev->key &&
++                (strcmp(info->drv->driverName, "evdev") == 0))
++                break;
++        }
++
++        if (!info)
++            SwitchCoreKeyboard(dev);
++    }
++
+     *pdev = dev;
+     return Success;
+ 
+-- 
+1.5.5.1
+




More information about the arch-commits mailing list