xserver: Branch 'master' - 4 commits

Peter Hutterer whot at kemper.freedesktop.org
Thu Oct 23 00:14:19 PDT 2008


 dix/devices.c                   |    9 +++++-
 dix/dispatch.c                  |    2 +
 hw/xfree86/common/xf86Globals.c |   57 +++++++++++++++++++++-------------------
 3 files changed, 40 insertions(+), 28 deletions(-)

New commits:
commit ff60e592f003d8bc45789a1a14e86be22f5242b2
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Thu Oct 23 09:19:41 2008 +1030

    dix: don't allow VCP/VCK be disabled through properties.

diff --git a/dix/devices.c b/dix/devices.c
index 972edcb..1100a29 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -111,6 +111,11 @@ DeviceSetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
         if (prop->format != 8 || prop->type != XA_INTEGER || prop->size != 1)
             return BadValue;
 
+        /* Don't allow disabling of VCP/VCK */
+        if ((dev == inputInfo.pointer || dev == inputInfo.keyboard) &&
+            !(*(CARD8*)prop->data))
+            return BadAccess;
+
         if (!checkonly)
         {
             if ((*((CARD8*)prop->data)) && !dev->enabled)
commit 98f01c2abe4771d76febf8fe70111b2bddfab776
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Thu Oct 23 09:13:41 2008 +1030

    dix: fix endianess issue in AddInputDevice. #18111
    
    dev->enabled is a Bool. Bool is two bytes.
    BOOL on the other hand is a protocol type and always 1 byte. So copy the value
    into the one-byte type before passing it into XIChangeDeviceProperty.
    
    Found by Michel Dänzer.
    
    X.Org Bug 18111 <http://bugs.freedesktop.org/show_bug.cgi?id=18111>

diff --git a/dix/devices.c b/dix/devices.c
index d386f41..972edcb 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -139,6 +139,7 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart)
     DeviceIntPtr devtmp;
     int devid;
     char devind[MAX_DEVICES];
+    BOOL enabled;
 
     /* Find next available id */
     memset(devind, 0, sizeof(char)*MAX_DEVICES);
@@ -183,8 +184,9 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart)
     *prev = dev;
     dev->next = NULL;
 
+    enabled = TRUE;
     XIChangeDeviceProperty(dev, XIGetKnownProperty(XI_PROP_ENABLED),
-                           XA_INTEGER, 8, PropModeReplace, 1, &dev->enabled,
+                           XA_INTEGER, 8, PropModeReplace, 1, &enabled,
                            FALSE);
     XISetDevicePropertyDeletable(dev, XIGetKnownProperty(XI_PROP_ENABLED), FALSE);
     XIRegisterPropertyHandler(dev, DeviceSetProperty, NULL, NULL);
commit f6cbe0326c57e3c9897f17baef78199b06537c44
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Wed Oct 22 18:16:12 2008 +1030

    dix: init remaining three xkb fields to zero in a new client.

diff --git a/dix/dispatch.c b/dix/dispatch.c
index 3909dc8..c4a6a9c 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -3483,6 +3483,8 @@ void InitClient(ClientPtr client, int i, pointer ospriv)
     if (!noXkbExtension) {
 	client->xkbClientFlags = 0;
 	client->mapNotifyMask = 0;
+	client->newKeyboardNotifyMask = 0;
+	client->vMinor = client->vMajor = 0;
 	QueryMinMaxKeyCodes(&client->minKC,&client->maxKC);
     }
 #endif
commit 0b56b44addc323a00eb7cd86240cb0dd4275bcf8
Author: Peter Hutterer <peter.hutterer at redhat.com>
Date:   Mon Oct 20 17:06:40 2008 +1030

    xfree86: AllowEmptyInput is true by default - update the xf86Info defaults.
    
    Also set AutoAddDevices and AutoEnableDevices to their defaults.
    
    And in doing so, switch the rest of the defaults over to named intializers.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at redhat.com>

diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index f72f1b6..dfc2bd7 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -98,37 +98,40 @@ InputInfoPtr xf86InputDevs = NULL;
 /* Globals that video drivers may not access */
 
 xf86InfoRec xf86Info = {
-	-1,		/* consoleFd */
-	-1,		/* vtno */
-	FALSE,		/* vtSysreq */
-	SKWhenNeeded,	/* ddxSpecialKeys */
-	-1,		/* lastEventTime */
-	FALSE,		/* vtRequestsPending */
-	FALSE,		/* dontVTSwitch */
-	FALSE,		/* dontZap */
-	FALSE,		/* dontZoom */
-	FALSE,		/* notrapSignals */
-	FALSE,		/* caughtSignal */
-	NULL,		/* currentScreen */
+    .consoleFd                  = -1,
+    .vtno                       = -1,
+    .vtSysreq                   = FALSE,
+    .ddxSpecialKeys             = SKWhenNeeded,
+    .lastEventTime              = -1,
+    .vtRequestsPending          = FALSE,
+    .dontVTSwitch               = FALSE,
+    .dontZap                    = FALSE,
+    .dontZoom                   = FALSE,
+    .notrapSignals              = FALSE,
+    .caughtSignal               = FALSE,
+    .currentScreen              = NULL,
 #ifdef CSRG_BASED
-	-1,		/* screenFd */
-	-1,		/* consType */
+    .screenFd                   = -1,
+    .consType                   = -1,
 #endif
-	FALSE,		/* allowMouseOpenFail */
-	TRUE,		/* vidModeEnabled */
-	FALSE,		/* vidModeAllowNonLocal */
-	TRUE,		/* miscModInDevEnabled */
-	FALSE,		/* miscModInDevAllowNonLocal */
-	Pix24DontCare,	/* pixmap24 */
-	X_DEFAULT,	/* pix24From */
+    .allowMouseOpenFail         = FALSE,
+    .vidModeEnabled             = TRUE,
+    .vidModeAllowNonLocal       = FALSE,
+    .miscModInDevEnabled        = TRUE,
+    .miscModInDevAllowNonLocal  = FALSE,
+    .pixmap24                   = Pix24DontCare,
+    .pix24From                  = X_DEFAULT,
 #ifdef __i386__
-	FALSE,		/* pc98 */
+    .pc98                       = FALSE,
 #endif
-	TRUE,		/* pmFlag */
-	LogNone,	/* syncLog */
-	FALSE,		/* kbdCustomKeycodes */
-	FALSE,		/* disableRandR */
-	X_DEFAULT	/* randRFrom */
+    .pmFlag                     = TRUE,
+    .log                        = LogNone,
+    .kbdCustomKeycodes          = FALSE,
+    .disableRandR               = FALSE,
+    .randRFrom                  = X_DEFAULT,
+    .allowEmptyInput            = TRUE,
+    .autoAddDevices             = TRUE,
+    .autoEnableDevices          = TRUE
 };
 const char *xf86ConfigFile = NULL;
 const char *xf86InputDeviceList = NULL;


More information about the xorg-commit mailing list