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

xorg-server: Changes to 'upstream-experimental'



 Xext/geext.c                     |    2 -
 Xext/xtest.c                     |    5 --
 Xi/exevents.c                    |   10 +++--
 Xi/extinit.c                     |    7 ++-
 Xi/getprop.c                     |    2 -
 Xi/getselev.c                    |    6 +--
 Xi/xichangehierarchy.c           |    2 +
 Xi/xiquerydevice.c               |    7 ++-
 configure.ac                     |    4 +-
 dix/colormap.c                   |    2 +
 dix/devices.c                    |   42 +++++++++++++++++++++
 dix/dixfonts.c                   |   18 +--------
 dix/eventconvert.c               |   23 ++++-------
 dix/events.c                     |    7 +--
 dix/extension.c                  |    5 +-
 dix/getevents.c                  |    4 ++
 fb/fboverlay.c                   |    8 +++-
 fb/fbscreen.c                    |    4 --
 hw/xfree86/common/xf86Config.c   |   32 +++++++++++-----
 hw/xfree86/common/xf86Helper.c   |    1 
 hw/xfree86/common/xf86Init.c     |    4 +-
 hw/xfree86/common/xf86Option.c   |   77 ++++++++++++++++++++++++---------------
 hw/xfree86/doc/man/xorg.conf.man |   13 +++++-
 hw/xfree86/dri2/dri2.c           |    9 +++-
 hw/xfree86/loader/loadmod.c      |    6 +++
 hw/xquartz/bundle/Info.plist.cpp |    4 +-
 mi/micmap.c                      |    2 +
 mi/midispcur.c                   |   10 -----
 mi/mipointer.c                   |    1 
 mi/mispans.c                     |    2 +
 mi/mizerline.c                   |    6 ++-
 os/utils.c                       |   21 +++-------
 render/render.c                  |   25 ++++++------
 xfixes/region.c                  |    2 -
 xkb/XKBGAlloc.c                  |    4 +-
 xkb/ddxList.c                    |    4 +-
 36 files changed, 231 insertions(+), 150 deletions(-)

New commits:
commit ec6e1e45627de2bb851f135df0507a360d0d99e6
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Apr 8 16:36:32 2011 -0700

    configure.ac: Version bumped to 1.10.0.902 (1.10.1 RC2)
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/configure.ac b/configure.ac
index 4a09bba..d5d3e3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,8 +26,8 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.57)
-AC_INIT([xorg-server], 1.10.0.901, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2011-03-29"
+AC_INIT([xorg-server], 1.10.0.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2011-04-08"
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE

commit 7379f7a7717a431ba4f8cf371aad9838aec7bec6
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Wed Apr 6 14:51:45 2011 -0400

    Fix unset valuator handling for XI 1.x valuator events again
    
    Set the valuator values for unset masked absolute valuators in the
    internal device event. This ensures the values will always be correct in
    getValuatorEvents even if the device has been removed.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit b28a1af55cf1ad2a882cc8cd73b77341dec7ff5a)

diff --git a/dix/eventconvert.c b/dix/eventconvert.c
index edcb9dd..a73c671 100644
--- a/dix/eventconvert.c
+++ b/dix/eventconvert.c
@@ -359,12 +359,12 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv)
     int i;
     int state = 0;
     int first_valuator, num_valuators;
-    DeviceIntPtr dev = NULL;
 
 
     num_valuators = countValuators(ev, &first_valuator);
     if (num_valuators > 0)
     {
+        DeviceIntPtr dev = NULL;
         dixLookupDevice(&dev, ev->deviceid, serverClient, DixUseAccess);
         /* State needs to be assembled BEFORE the device is updated. */
         state = (dev && dev->key) ? XkbStateFieldFromRec(&dev->key->xkbInfo->state) : 0;
@@ -381,14 +381,10 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv)
         xv->deviceid = ev->deviceid;
         xv->device_state = state;
 
-        for (j = 0; j < xv->num_valuators; j++) {
-            if (BitIsOn(ev->valuators.mask, xv->first_valuator + j))
-                valuators[j] = ev->valuators.data[xv->first_valuator + j];
-            else if (dev->valuator->axes[xv->first_valuator + j].mode == Absolute)
-                valuators[j] = dev->valuator->axisVal[xv->first_valuator + j];
-            else
-                valuators[j] = 0;
-        }
+        /* Unset valuators in masked valuator events have the proper data values
+         * in the case of an absolute axis in between two set valuators. */
+        for (j = 0; j < xv->num_valuators; j++)
+            valuators[j] = ev->valuators.data[xv->first_valuator + j];
 
         if (i + 6 < num_valuators)
             xv->deviceid |= MORE_EVENTS;
diff --git a/dix/getevents.c b/dix/getevents.c
index 794df42..8355040 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -205,6 +205,8 @@ set_valuators(DeviceIntPtr dev, DeviceEvent* event, ValuatorMask *mask)
 {
     int i;
 
+    /* Set the data to the previous value for unset absolute axes. The values
+     * may be used when sent as part of an XI 1.x valuator event. */
     for (i = 0; i < valuator_mask_size(mask); i++)
     {
         if (valuator_mask_isset(mask, i))
@@ -216,6 +218,8 @@ set_valuators(DeviceIntPtr dev, DeviceEvent* event, ValuatorMask *mask)
             event->valuators.data_frac[i] =
                 dev->last.remainder[i] * (1 << 16) * (1 << 16);
         }
+        else if (valuator_get_mode(dev, i) == Absolute)
+            event->valuators.data[i] = dev->valuator->axisVal[i];
     }
 }
 

commit 89142b356b3119d7b7012df075fc7698ec38e769
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Thu Mar 31 11:29:01 2011 -0400

    Don't report old relative values in getValuatorEvents
    
    Relative valuator values should not be reported in any future events. If
    a relative valuator value is not set in an internal event, set the value
    to 0 for XI 1.x valuator events sent over the wire.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Reviewed-by: Simon Thum <simon.thum@gmx.de>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit f40103cee1d591387359f401a5a7c21f4105aeb4)

diff --git a/dix/eventconvert.c b/dix/eventconvert.c
index 7893880..edcb9dd 100644
--- a/dix/eventconvert.c
+++ b/dix/eventconvert.c
@@ -384,8 +384,10 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv)
         for (j = 0; j < xv->num_valuators; j++) {
             if (BitIsOn(ev->valuators.mask, xv->first_valuator + j))
                 valuators[j] = ev->valuators.data[xv->first_valuator + j];
-            else
+            else if (dev->valuator->axes[xv->first_valuator + j].mode == Absolute)
                 valuators[j] = dev->valuator->axisVal[xv->first_valuator + j];
+            else
+                valuators[j] = 0;
         }
 
         if (i + 6 < num_valuators)

commit f1a8f8afc7424346dbe3360eaa5fd95d458de2e0
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Mon Mar 28 16:04:48 2011 -0400

    Handle non continuous valuator data in getValuatorEvents
    
    This allows for masked valuators to be handled properly in XI 1.x
    events. Any unset valuators in the device event are set to the last
    known value when transmitted on the wire through XI 1.x valuator events.
    
    Fixes https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/736500
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 8199eac443d2c22d313cb23e39d5e607a8cc7f99)

diff --git a/dix/eventconvert.c b/dix/eventconvert.c
index 3b2697f..7893880 100644
--- a/dix/eventconvert.c
+++ b/dix/eventconvert.c
@@ -359,19 +359,18 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv)
     int i;
     int state = 0;
     int first_valuator, num_valuators;
+    DeviceIntPtr dev = NULL;
 
 
     num_valuators = countValuators(ev, &first_valuator);
     if (num_valuators > 0)
     {
-        DeviceIntPtr dev = NULL;
         dixLookupDevice(&dev, ev->deviceid, serverClient, DixUseAccess);
         /* State needs to be assembled BEFORE the device is updated. */
         state = (dev && dev->key) ? XkbStateFieldFromRec(&dev->key->xkbInfo->state) : 0;
         state |= (dev && dev->button) ? (dev->button->state) : 0;
     }
 
-    /* FIXME: non-continuous valuator data in internal events*/
     for (i = 0; i < num_valuators; i += 6, xv++) {
         INT32 *valuators = &xv->valuator0; // Treat all 6 vals as an array
         int j;
@@ -382,8 +381,12 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv)
         xv->deviceid = ev->deviceid;
         xv->device_state = state;
 
-        for (j = 0; j < xv->num_valuators; j++)
-            valuators[j] = ev->valuators.data[xv->first_valuator + j];
+        for (j = 0; j < xv->num_valuators; j++) {
+            if (BitIsOn(ev->valuators.mask, xv->first_valuator + j))
+                valuators[j] = ev->valuators.data[xv->first_valuator + j];
+            else
+                valuators[j] = dev->valuator->axisVal[xv->first_valuator + j];
+        }
 
         if (i + 6 < num_valuators)
             xv->deviceid |= MORE_EVENTS;

commit a9c90ebe3357546fbd12430ca31623d419e77212
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Mon Mar 28 16:04:47 2011 -0400

    Clean up getValuatorEvents using array loop logic
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Reviewed-by: Jamey Sharp <jamey@minilop.net>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit ac00ab77d5a00cfd198958aa1afaa4c3ccc6d7bc)

diff --git a/dix/eventconvert.c b/dix/eventconvert.c
index dd1ca46..3b2697f 100644
--- a/dix/eventconvert.c
+++ b/dix/eventconvert.c
@@ -373,25 +373,17 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv)
 
     /* FIXME: non-continuous valuator data in internal events*/
     for (i = 0; i < num_valuators; i += 6, xv++) {
+        INT32 *valuators = &xv->valuator0; // Treat all 6 vals as an array
+        int j;
+
         xv->type = DeviceValuator;
         xv->first_valuator = first_valuator + i;
         xv->num_valuators = ((num_valuators - i) > 6) ? 6 : (num_valuators - i);
         xv->deviceid = ev->deviceid;
         xv->device_state = state;
-        switch (xv->num_valuators) {
-        case 6:
-            xv->valuator5 = ev->valuators.data[xv->first_valuator + 5];
-        case 5:
-            xv->valuator4 = ev->valuators.data[xv->first_valuator + 4];
-        case 4:
-            xv->valuator3 = ev->valuators.data[xv->first_valuator + 3];
-        case 3:
-            xv->valuator2 = ev->valuators.data[xv->first_valuator + 2];
-        case 2:
-            xv->valuator1 = ev->valuators.data[xv->first_valuator + 1];
-        case 1:
-            xv->valuator0 = ev->valuators.data[xv->first_valuator + 0];
-        }
+
+        for (j = 0; j < xv->num_valuators; j++)
+            valuators[j] = ev->valuators.data[xv->first_valuator + j];
 
         if (i + 6 < num_valuators)
             xv->deviceid |= MORE_EVENTS;

commit 1f51fe4f748b2997e466863d8387bd6791b32931
Author: Matthieu Herrb <matthieu.herrb@laas.fr>
Date:   Fri Apr 1 22:55:57 2011 +0200

    Xi: fix querydevice request swapping
    
    WriteReplyToClient() swaps rep.length, so it can't be used
    on return of WriteReplyToClient(). So save it's value for later
    use.
    
    Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    (cherry picked from commit 266ea63bc3e052b753c5484fa08dcc4fb67c8952)

diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c
index cb7a5fb..f8d6c13 100644
--- a/Xi/xiquerydevice.c
+++ b/Xi/xiquerydevice.c
@@ -155,8 +155,9 @@ ProcXIQueryDevice(ClientPtr client)
         }
     }
 
+    len = rep.length * 4;
     WriteReplyToClient(client, sizeof(xXIQueryDeviceReply), &rep);
-    WriteToClient(client, rep.length * 4, ptr);
+    WriteToClient(client, len, ptr);
     free(ptr);
     free(skip);
     return rc;

commit 2f12adb2c914732ae3a328b759d272d8bbbb55a6
Author: Matthieu Herrb <matthieu.herrb@laas.fr>
Date:   Fri Apr 1 22:54:54 2011 +0200

    Xext: fix test on extension number for the swapped case.
    
    Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    (cherry picked from commit 552c78592c5e5f52fe16e2429f77c63adf398247)

diff --git a/Xext/geext.c b/Xext/geext.c
index b37c1a0..a6fbb09 100644
--- a/Xext/geext.c
+++ b/Xext/geext.c
@@ -185,7 +185,7 @@ SGEGenericEvent(xEvent* from, xEvent* to)
     xGenericEvent* gefrom = (xGenericEvent*)from;
     xGenericEvent* geto = (xGenericEvent*)to;
 
-    if (gefrom->extension > MAXEXTENSIONS)
+    if ((gefrom->extension & 0x7f) > MAXEXTENSIONS)
     {
         ErrorF("GE: Invalid extension offset for event.\n");
         return;

commit e08a7df54da8aeb343412ed9dda250207dc749f4
Author: Matthieu Herrb <matthieu.herrb@laas.fr>
Date:   Fri Apr 1 22:53:40 2011 +0200

    Xi: add XI_Focus{In,Out} to swapped events.
    
    Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    (cherry picked from commit a074e6b6754d6c2706b2b5de54e22cbffc5b1a17)

diff --git a/Xi/extinit.c b/Xi/extinit.c
index c26cd6b..ec815c9 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -864,6 +864,8 @@ XI2EventSwap(xGenericEvent *from, xGenericEvent *to)
     {
         case XI_Enter:
         case XI_Leave:
+        case XI_FocusIn:
+        case XI_FocusOut:
             SDeviceLeaveNotifyEvent((xXILeaveEvent*)from, (xXILeaveEvent*)to);
             break;
         case XI_DeviceChanged:

commit 69ee0f68b7bbd8007d91b8485a4c6684c552a9dd
Author: Matthieu Herrb <matthieu.herrb@laas.fr>
Date:   Fri Apr 1 22:51:48 2011 +0200

    Xi: take XI2 requests into account also for the swapping case.
    
    Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    (cherry picked from commit 81257377a2d011ce47fba5822df0f7918dea1d72)

diff --git a/Xi/extinit.c b/Xi/extinit.c
index 82df7eb..c26cd6b 100644
--- a/Xi/extinit.c
+++ b/Xi/extinit.c
@@ -49,6 +49,7 @@ SOFTWARE.
  *  Dispatch routines and initialization routines for the X input extension.
  *
  */
+#define ARRAY_SIZE(_a)        (sizeof((_a)) / sizeof((_a)[0]))
 
 #define	 NUMTYPES 15
 
@@ -410,7 +411,7 @@ static int
 ProcIDispatch(ClientPtr client)
 {
     REQUEST(xReq);
-    if (stuff->data > (IREQUESTS + XI2REQUESTS) || !ProcIVector[stuff->data])
+    if (stuff->data > ARRAY_SIZE(ProcIVector) || !ProcIVector[stuff->data])
         return BadRequest;
 
     return (*ProcIVector[stuff->data])(client);
@@ -429,7 +430,7 @@ static int
 SProcIDispatch(ClientPtr client)
 {
     REQUEST(xReq);
-    if (stuff->data > IREQUESTS || !SProcIVector[stuff->data])
+    if (stuff->data > ARRAY_SIZE(SProcIVector) || !SProcIVector[stuff->data])
         return BadRequest;
 
     return (*SProcIVector[stuff->data])(client);

commit 0a54ec5099bd04ebdce3f683ecb0f8cf4da025d9
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Mar 15 13:20:03 2011 +1000

    man: list the drivers that are ignored when hotplugging (#35209)
    
    X.Org Bug 35209 <http://bugs.freedesktop.org/show_bug.cgi?id=35209>
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Cyril Brulebois <kibi@debian.org>
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    (cherry picked from commit 6f46ae3c69c48f389560af1491ed1729ba45866f)

diff --git a/hw/xfree86/doc/man/xorg.conf.man b/hw/xfree86/doc/man/xorg.conf.man
index e3fd0ea..4bec316 100644
--- a/hw/xfree86/doc/man/xorg.conf.man
+++ b/hw/xfree86/doc/man/xorg.conf.man
@@ -814,11 +814,18 @@ Example: the MIT-SHM extension can be disabled with the following entry:
 The config file may have multiple
 .B InputDevice
 sections.
-Recent X servers employ input hotplugging to add input devices, with the HAL
-backend being the default backend for X servers since 1.4. It is usually not
+Recent X servers employ HAL or udev backends for input device enumeration
+and input hotplugging. It is usually not
 necessary to provide
 .B InputDevice
-sections in the xorg.conf if hotplugging is enabled.
+sections in the xorg.conf if hotplugging is in use. If hotplugging is
+enabled,
+.B InputDevice
+sections using the
+.B mouse, kbd
+and
+.B vmmouse
+driver will be ignored.
 .PP
 If hotplugging is disabled, there will normally
 be at least two: one for the core (primary) keyboard

commit e9ba0539de1c4dfb946e1885cd64b3fc45bc2dbe
Author: Daniel Stone <daniel@fooishbar.org>
Date:   Tue Feb 22 13:43:28 2011 +0000

    Input: Don't freeze unrelated devices in DeliverGrabbedEvent
    
    When delivering an event to a device grabbed with SyncBoth,
    DeliverGrabbedEvent walks the device tree looking for associated devices
    to freeze them.  Unfortunately, it froze all devices instead of just the
    paired device, and the previous fix in 4fbadc8b17237f3c would still break
    if the same client had a non-SyncBoth grab on another unrelated master
    device.
    
    Fix this by completely ignoring devices that aren't our paired device.
    
    Signed-off-by: Daniel Stone <daniel@fooishbar.org>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit b636893137da1695e235e3a9354bfd9243fdddc2)

diff --git a/dix/events.c b/dix/events.c
index 07f8b05..f0ea576 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3872,16 +3872,15 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev,
 	switch (grabinfo->sync.state)
 	{
 	case FREEZE_BOTH_NEXT_EVENT:
-	    for (dev = inputInfo.devices; dev; dev = dev->next)
+	    dev = GetPairedDevice(thisDev);
+	    if (dev)
 	    {
-		if (dev == thisDev)
-		    continue;
 		FreezeThaw(dev, TRUE);
 		if ((dev->deviceGrab.sync.state == FREEZE_BOTH_NEXT_EVENT) &&
 		    (CLIENT_BITS(grab->resource) ==
 		     CLIENT_BITS(dev->deviceGrab.grab->resource)))
 		    dev->deviceGrab.sync.state = FROZEN_NO_EVENT;
-		else if (GetPairedDevice(thisDev) == dev)
+		else
                     dev->deviceGrab.sync.other = grab;
 	    }
 	    /* fall through */

commit ff066dc75b6b8eb3f957d00f57011197a588cec6
Author: Bryce Harrington <bryce@canonical.com>
Date:   Wed Feb 16 16:55:57 2011 -0800

    Check for OOM condition in XISendDeviceHierarchyEvent
    
    When system is out of memory, calloc can fail returning a NULL pointer.
    Check for this before dereferencing it, and bail out if it fails.
    
    Ref.: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/720445
    
    Signed-off-by: Bryce Harrington <bryce@canonical.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 649269d40667cfb387cb5286dd3519dd68f7dd80)

diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c
index b9cdedf..21c74ed 100644
--- a/Xi/xichangehierarchy.c
+++ b/Xi/xichangehierarchy.c
@@ -70,6 +70,8 @@ void XISendDeviceHierarchyEvent(int flags[MAXDEVICES])
 
     ev = calloc(1, sizeof(xXIHierarchyEvent) +
                  MAXDEVICES * sizeof(xXIHierarchyInfo));
+    if (!ev)
+        return;
     ev->type = GenericEvent;
     ev->extension = IReqCode;
     ev->evtype = XI_HierarchyChanged;

commit 1a2fab98104468b5f17d54c206213af5b0226bfd
Author: Simon Thum <simon.thum@gmx.de>
Date:   Sun Feb 6 19:13:00 2011 +0100

    xfree86: allow to check for options without warnings in the log
    
    This allows set_percent_option in synaptics to work as described,
    and should generally enable to check option syntax without log spam.
    
    Signed-off-by: Simon Thum <simon.thum@gmx.de>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 38ffeec0c89e83afc62579dec221c325d667cc1e)

diff --git a/hw/xfree86/common/xf86Option.c b/hw/xfree86/common/xf86Option.c
index 455cafa..480f386 100644
--- a/hw/xfree86/common/xf86Option.c
+++ b/hw/xfree86/common/xf86Option.c
@@ -496,27 +496,33 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p,
 	switch (p->type) {
 	case OPTV_INTEGER:
 	    if (*s == '\0') {
-		xf86DrvMsg(scrnIndex, X_WARNING,
-			   "Option \"%s\" requires an integer value\n",
-			   p->name);
+		if (markUsed) {
+		    xf86DrvMsg(scrnIndex, X_WARNING,
+			       "Option \"%s\" requires an integer value\n",
+			       p->name);
+		}
 		p->found = FALSE;
 	    } else {
 		p->value.num = strtoul(s, &end, 0);
 		if (*end == '\0') {
 		    p->found = TRUE;
 		} else {
-		    xf86DrvMsg(scrnIndex, X_WARNING,
-			       "Option \"%s\" requires an integer value\n",
-			        p->name);
+		    if (markUsed) {
+			xf86DrvMsg(scrnIndex, X_WARNING,
+				   "Option \"%s\" requires an integer value\n",
+				    p->name);
+		    }
 		    p->found = FALSE;
 		}
 	    }
 	    break;
 	case OPTV_STRING:
 	    if (*s == '\0') {
-		xf86DrvMsg(scrnIndex, X_WARNING,
-			   "Option \"%s\" requires an string value\n",
-			   p->name);
+		if (markUsed) {
+		    xf86DrvMsg(scrnIndex, X_WARNING,
+			       "Option \"%s\" requires an string value\n",
+			       p->name);
+		}
 		p->found = FALSE;
 	    } else {
 		p->value.str = s;
@@ -529,18 +535,22 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p,
 	    break;
 	case OPTV_REAL:	
 	    if (*s == '\0') {
-		xf86DrvMsg(scrnIndex, X_WARNING,
-			   "Option \"%s\" requires a floating point value\n",
-			   p->name);
+		if (markUsed) {
+		    xf86DrvMsg(scrnIndex, X_WARNING,
+			       "Option \"%s\" requires a floating point "
+			       "value\n", p->name);
+		}
 		p->found = FALSE;
 	    } else {
 		p->value.realnum = strtod(s, &end);
 		if (*end == '\0') {
 		    p->found = TRUE;
 		} else {
-		    xf86DrvMsg(scrnIndex, X_WARNING,
-			    "Option \"%s\" requires a floating point value\n",
-			    p->name);
+		    if (markUsed) {
+			xf86DrvMsg(scrnIndex, X_WARNING,
+				"Option \"%s\" requires a floating point "
+				"value\n", p->name);
+		    }
 		    p->found = FALSE;
 		}
 	    }
@@ -549,8 +559,11 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p,
 	    if (GetBoolValue(p, s)) {
 		p->found = TRUE;
 	    } else {
-		xf86DrvMsg(scrnIndex, X_WARNING,
-			   "Option \"%s\" requires a boolean value\n", p->name);
+		if (markUsed) {
+		    xf86DrvMsg(scrnIndex, X_WARNING,
+			       "Option \"%s\" requires a boolean value\n",
+			       p->name);
+		}
 		p->found = FALSE;
 	    }
 	    break;
@@ -561,8 +574,10 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p,
 		 * hence 100 looks the same as 100% to the caller of sccanf
 		 */
 		if (sscanf(s, "%lf%c", &p->value.realnum, &tmp) != 2 || tmp != '%') {
-		    xf86DrvMsg(scrnIndex, X_WARNING,
+		    if (markUsed) {
+			xf86DrvMsg(scrnIndex, X_WARNING,
 			       "Option \"%s\" requires a percent value\n", p->name);
+		    }
 		    p->found = FALSE;
 		} else {
 		    p->found = TRUE;
@@ -571,9 +586,11 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p,
 	    break;
 	case OPTV_FREQ:	
 	    if (*s == '\0') {
-		xf86DrvMsg(scrnIndex, X_WARNING,
-			   "Option \"%s\" requires a frequency value\n",
-			   p->name);
+		if (markUsed) {
+		    xf86DrvMsg(scrnIndex, X_WARNING,
+			       "Option \"%s\" requires a frequency value\n",
+			       p->name);
+		}
 		p->found = FALSE;
 	    } else {
 		double freq = strtod(s, &end);
@@ -590,17 +607,21 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p,
 			     !xf86NameCmp(end, "M"))
 			units = 1000000;
 		    else {
-			xf86DrvMsg(scrnIndex, X_WARNING,
-			    "Option \"%s\" requires a frequency value\n",
-			    p->name);
+			if (markUsed) {
+			    xf86DrvMsg(scrnIndex, X_WARNING,
+				"Option \"%s\" requires a frequency value\n",
+				p->name);
+			}
 			p->found = FALSE;
 		    }
 		    if (p->found)
 			freq *= (double)units;
 		} else {
-		    xf86DrvMsg(scrnIndex, X_WARNING,
-			    "Option \"%s\" requires a frequency value\n",
-			    p->name);
+		    if (markUsed) {
+			xf86DrvMsg(scrnIndex, X_WARNING,
+				"Option \"%s\" requires a frequency value\n",
+				p->name);
+		    }
 		    p->found = FALSE;
 		}
 		if (p->found) {

commit 677aeef14b322615c67c3871e9b29638a9b341c4
Author: Simon Thum <simon.thum@gmx.de>
Date:   Sun Feb 6 19:07:19 2011 +0100

    fix percent options parsing
    
    Signed-off-by: Simon Thum <simon.thum@gmx.de>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 2fbccc881bfab4bdc5b97f74a7e5bcec7fdeae20)

diff --git a/hw/xfree86/common/xf86Option.c b/hw/xfree86/common/xf86Option.c
index 16c27e5..455cafa 100644
--- a/hw/xfree86/common/xf86Option.c
+++ b/hw/xfree86/common/xf86Option.c
@@ -212,7 +212,7 @@ LookupBoolOption(pointer optlist, const char *name, int deflt, Bool markUsed)
     return deflt;
 }
 
-static int
+static double
 LookupPercentOption(pointer optlist, const char *name, double deflt, Bool markUsed)
 {
     OptionInfoRec o;

commit 8da04cb0d94462a2bdfe3003e3c460cecbecb6f6
Author: Daniel Stone <daniel@fooishbar.org>
Date:   Tue Feb 15 11:27:59 2011 +0000

    Input: Actually send Xi 1.x DeviceStateNotify events
    
    When a client has selected for Xi 1.x DeviceStateNotify events, they
    should receive them when a DeviceFocusIn event is generated.  The code
    to do this was there, but an incorrect test meant they were never being
    sent.
    
    The "type" passed in is the XI2 type, the XI1 type is in event.type.
    
    Signed-off-by: Daniel Stone <daniel@fooishbar.org>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 737562257e8ee30b1c438e5160a61fbb26ca609e)

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 3da50bf..35f96e6 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1280,7 +1280,7 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail,
     DeliverEventsToWindow(dev, pWin, (xEvent *) & event, 1,
 				DeviceFocusChangeMask, NullGrab);
 
-    if ((type == DeviceFocusIn) &&
+    if ((event.type == DeviceFocusIn) &&
 	(wOtherInputMasks(pWin)) &&
 	(wOtherInputMasks(pWin)->inputEvents[dev->id] & DeviceStateNotifyMask))
     {

commit 9c803d2fe06163157edf84ed8e0563db20ec4a73
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Feb 13 21:36:04 2011 -0800

    XkbAddGeomProperty: Fix checks for malloc failure
    
    Check the variable we just tried to malloc, not the string we're copying
    and already checked for NULL at the beginning of the function.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
    (cherry picked from commit 682865c460945e1299f943561140f46439e2b4cb)

diff --git a/xkb/XKBGAlloc.c b/xkb/XKBGAlloc.c
index 3ec9eda..f49aead 100644
--- a/xkb/XKBGAlloc.c
+++ b/xkb/XKBGAlloc.c
@@ -659,11 +659,11 @@ register XkbPropertyPtr prop;
     }
     prop= &geom->properties[geom->num_properties];
     prop->name= malloc(strlen(name)+1);
-    if (!name)
+    if (!prop->name)
 	return NULL;
     strcpy(prop->name,name);
     prop->value= malloc(strlen(value)+1);
-    if (!value) {
+    if (!prop->value) {
 	free(prop->name);
 	prop->name= NULL;
 	return NULL;

commit 81fbb96c54f78a7cd96433294ee003c7ef6a772a
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Feb 25 11:08:19 2011 +1000

    dix: release all buttons and keys before reattaching a device (#34182)
    
    Testcase:
      xinput float <keyboard name>
    
    results in the keyboard's enter key being repeated as the device is detached
    while the key is still physically down. To avoid this, release all keys and
    buttons before reattaching the device.
    
    X.Org Bug 34182 <http://bugs.freedesktop.org/show_bug.cgi?id=34182>
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org>
    (cherry picked from commit 9d23459415b84606ee4f38bb2d19054c432c8552)

diff --git a/dix/devices.c b/dix/devices.c
index 55f22cb..84284e7 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -2380,6 +2380,46 @@ RecalculateMasterButtons(DeviceIntPtr slave)
 }
 
 /**
+ * Generate release events for all keys/button currently down on this
+ * device.
+ */
+static void
+ReleaseButtonsAndKeys(DeviceIntPtr dev)
+{
+    EventListPtr        eventlist = InitEventList(GetMaximumEventsNum());
+    ButtonClassPtr      b = dev->button;
+    KeyClassPtr         k = dev->key;
+    int                 i, j, nevents;
+
+    if (!eventlist) /* no release events for you */
+        return;
+
+    /* Release all buttons */
+    for (i = 0; b && i < b->numButtons; i++)
+    {
+        if (BitIsOn(b->down, i))
+        {
+            nevents = GetPointerEvents(eventlist, dev, ButtonRelease, i, 0, NULL);
+            for (j = 0; j < nevents; j++)
+                mieqProcessDeviceEvent(dev, (InternalEvent*)(eventlist+j)->event, NULL);
+        }
+    }
+
+    /* Release all keys */
+    for (i = 0; k && i < MAP_LENGTH; i++)
+    {
+        if (BitIsOn(k->down, i))
+        {
+            nevents = GetKeyboardEvents(eventlist, dev, KeyRelease, i);
+            for (j = 0; j < nevents; j++)
+                mieqProcessDeviceEvent(dev, (InternalEvent*)(eventlist+j)->event, NULL);
+        }
+    }
+
+    FreeEventList(eventlist, GetMaximumEventsNum());
+}
+
+/**
  * Attach device 'dev' to device 'master'.
  * Client is set to the client that issued the request, or NULL if it comes
  * from some internal automatic pairing.
@@ -2412,6 +2452,8 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master)
         free(dev->spriteInfo->sprite);
     }
 
+    ReleaseButtonsAndKeys(dev);
+
     oldmaster = dev->u.master;
     dev->u.master = master;
 

commit 49afcc76a1c799e18931cc762431975c5c059437
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Mon Apr 4 09:38:35 2011 -0700

    XQuartz: Bump bundle version to 2.6.2
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/hw/xquartz/bundle/Info.plist.cpp b/hw/xquartz/bundle/Info.plist.cpp
index 0e98218..4ecf8e4 100644
--- a/hw/xquartz/bundle/Info.plist.cpp
+++ b/hw/xquartz/bundle/Info.plist.cpp
@@ -19,9 +19,9 @@
 	<key>CFBundlePackageType</key>
 		<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-		<string>2.6.1</string>
+		<string>2.6.2</string>
 	<key>CFBundleVersion</key>
-		<string>2.6.1</string>
+		<string>2.6.2</string>
 	<key>CFBundleSignature</key>
 		<string>x11a</string>
 	<key>CSResourcesFileMapped</key>

commit 3d59f005cfc83f81f2847d94108f66f824cd926b
Author: Tiago Vignatti <tiago.vignatti@nokia.com>
Date:   Mon Mar 28 20:24:52 2011 +0300

    xfree86: loader: fix memory leaks in LoaderListDirs
    
    Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>

diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index eaa99e8..46ce68b 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -532,6 +532,7 @@ LoaderListDirs(const char **subdirlist, const char **patternlist)
 				FreePathList(pathlist);
 				FreeSubdirs(subdirs);
 				FreePatterns(patterns);
+				closedir(d);
 				return NULL;
 			    }
 			    listing[n] = malloc(len + 1);
@@ -540,6 +541,7 @@ LoaderListDirs(const char **subdirlist, const char **patternlist)
 				FreePathList(pathlist);
 				FreeSubdirs(subdirs);
 				FreePatterns(patterns);
+				closedir(d);
 				return NULL;
 			    }
 			    strncpy(listing[n], dp->d_name + match[1].rm_so,
@@ -556,6 +558,10 @@ LoaderListDirs(const char **subdirlist, const char **patternlist)
     }
     if (listing)
 	listing[n] = NULL;
+
+    FreePathList(pathlist);
+    FreeSubdirs(subdirs);
+    FreePatterns(patterns);
     return listing;
 }
 

commit 77fcfd0e94c200ee383cf9d03383cde947eef6fd
Author: Tiago Vignatti <tiago.vignatti@nokia.com>
Date:   Tue Mar 29 18:22:50 2011 +0300

    render: fix memory leaks in ProcRenderCompositeGlyphs
    
    Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
    Reviewed-by: Soren Sandmann <ssp@redhat.com>

diff --git a/render/render.c b/render/render.c
index 7029558..50f809c 100644
--- a/render/render.c
+++ b/render/render.c
@@ -1372,8 +1372,10 @@ ProcRenderCompositeGlyphs (ClientPtr client)
     else
     {
 	listsBase = (GlyphListPtr) malloc(nlist * sizeof (GlyphListRec));
-	if (!listsBase)
-	    return BadAlloc;
+	if (!listsBase) {
+	    rc = BadAlloc;
+	    goto bail;
+	}
     }
     buffer = (CARD8 *) (stuff + 1);
     glyphs = glyphsBase;
@@ -1392,13 +1394,7 @@ ProcRenderCompositeGlyphs (ClientPtr client)
 					     GlyphSetType, client,
 					     DixUseAccess);
 		if (rc != Success)
-		{
-		    if (glyphsBase != glyphsLocal)
-			free(glyphsBase);
-		    if (listsBase != listsLocal)
-			free(listsBase);
-		    return rc;
-		}
+		    goto bail;
 	    }
 	    buffer += 4;
 	}
@@ -1436,8 +1432,10 @@ ProcRenderCompositeGlyphs (ClientPtr client)
 	    lists++;
 	}
     }
-    if (buffer > end)
-	return BadLength;
+    if (buffer > end) {
+	rc = BadLength;
+	goto bail;
+    }
 
     CompositeGlyphs (stuff->op,
 		     pSrc,
@@ -1448,13 +1446,14 @@ ProcRenderCompositeGlyphs (ClientPtr client)
 		     nlist,
 		     listsBase,
 		     glyphsBase);
+    rc = Success;
 
+bail:
     if (glyphsBase != glyphsLocal)
 	free(glyphsBase);
     if (listsBase != listsLocal)
 	free(listsBase);
-    
-    return Success;
+    return rc;
 }
 
 static int

commit 066dbbaafdef9777c9c7e08cf32ac127437b7bb0
Author: Tiago Vignatti <tiago.vignatti@nokia.com>
Date:   Tue Mar 29 17:17:40 2011 +0300

    xkb: fix fd leak in XkbDDXListComponent
    
    Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>

diff --git a/xkb/ddxList.c b/xkb/ddxList.c
index 9623cb6..3d301d8 100644
--- a/xkb/ddxList.c
+++ b/xkb/ddxList.c
@@ -222,8 +222,10 @@ char	tmpname[PATH_MAX];
     list->nFound[what]= 0;
     free(buf);
     buf = malloc(PATH_MAX * sizeof(char));


Reply to: