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

xorg-server: Changes to 'upstream-experimental'



 Xi/exevents.c                                                  |  190 
 Xi/xiallowev.c                                                 |   81 
 configure.ac                                                   |    6 
 dix/events.c                                                   |   57 
 dix/getevents.c                                                |   21 
 dix/inpututils.c                                               |    3 
 dix/touch.c                                                    |   73 
 hw/xfree86/common/xf86Xinput.c                                 |   10 
 hw/xfree86/dri2/dri2.c                                         |   20 
 hw/xfree86/os-support/xf86_OSlib.h                             |    2 
 hw/xfree86/parser/InputClass.c                                 |   76 
 hw/xfree86/parser/xf86Parser.h                                 |   20 
 hw/xquartz/GL/capabilities.c                                   |    7 
 hw/xquartz/X11Application.m                                    |   29 
 hw/xquartz/X11Controller.m                                     |    7 
 hw/xquartz/bundle/Makefile.am                                  |   82 
 hw/xquartz/bundle/Resources/ar.lproj/main.nib/designable.nib   | 7549 ++++------
 hw/xquartz/bundle/Resources/ar.lproj/main.nib/keyedobjects.nib |binary
 hw/xquartz/bundle/Resources/ca.lproj/InfoPlist.strings         |binary
 hw/xquartz/bundle/Resources/ca.lproj/Localizable.strings       |binary
 hw/xquartz/bundle/Resources/ca.lproj/locversion.plist          |   14 
 hw/xquartz/bundle/Resources/ca.lproj/main.nib/designable.nib   | 3640 ++++
 hw/xquartz/bundle/Resources/ca.lproj/main.nib/keyedobjects.nib |binary
 hw/xquartz/bundle/Resources/cs.lproj/InfoPlist.strings         |binary
 hw/xquartz/bundle/Resources/cs.lproj/Localizable.strings       |binary
 hw/xquartz/bundle/Resources/cs.lproj/locversion.plist          |   14 
 hw/xquartz/bundle/Resources/cs.lproj/main.nib/designable.nib   | 3617 ++++
 hw/xquartz/bundle/Resources/cs.lproj/main.nib/keyedobjects.nib |binary
 hw/xquartz/bundle/Resources/el.lproj/locversion.plist          |    4 
 hw/xquartz/bundle/Resources/el.lproj/main.nib/designable.nib   | 7047 ++++-----
 hw/xquartz/bundle/Resources/el.lproj/main.nib/keyedobjects.nib |binary
 hw/xquartz/bundle/Resources/fi.lproj/main.nib/designable.nib   |   18 
 hw/xquartz/bundle/Resources/fi.lproj/main.nib/keyedobjects.nib |binary
 hw/xquartz/bundle/Resources/he.lproj/InfoPlist.strings         |binary
 hw/xquartz/bundle/Resources/he.lproj/Localizable.strings       |binary
 hw/xquartz/bundle/Resources/he.lproj/locversion.plist          |    4 
 hw/xquartz/bundle/Resources/he.lproj/main.nib/designable.nib   | 7312 +++++----
 hw/xquartz/bundle/Resources/he.lproj/main.nib/keyedobjects.nib |binary
 hw/xquartz/bundle/Resources/hr.lproj/InfoPlist.strings         |binary
 hw/xquartz/bundle/Resources/hr.lproj/Localizable.strings       |binary
 hw/xquartz/bundle/Resources/hr.lproj/locversion.plist          |   14 
 hw/xquartz/bundle/Resources/hr.lproj/main.nib/designable.nib   | 3533 ++++
 hw/xquartz/bundle/Resources/hr.lproj/main.nib/keyedobjects.nib |binary
 hw/xquartz/bundle/Resources/hu.lproj/InfoPlist.strings         |binary
 hw/xquartz/bundle/Resources/hu.lproj/Localizable.strings       |binary
 hw/xquartz/bundle/Resources/hu.lproj/locversion.plist          |   14 
 hw/xquartz/bundle/Resources/hu.lproj/main.nib/designable.nib   | 3642 ++++
 hw/xquartz/bundle/Resources/hu.lproj/main.nib/keyedobjects.nib |binary
 hw/xquartz/bundle/Resources/no.lproj/locversion.plist          |    4 
 hw/xquartz/bundle/Resources/no.lproj/main.nib/designable.nib   | 7482 ++++-----
 hw/xquartz/bundle/Resources/no.lproj/main.nib/keyedobjects.nib |binary
 hw/xquartz/bundle/Resources/ro.lproj/InfoPlist.strings         |binary
 hw/xquartz/bundle/Resources/ro.lproj/Localizable.strings       |binary
 hw/xquartz/bundle/Resources/ro.lproj/locversion.plist          |   14 
 hw/xquartz/bundle/Resources/ro.lproj/main.nib/designable.nib   | 3485 ++++
 hw/xquartz/bundle/Resources/ro.lproj/main.nib/keyedobjects.nib |binary
 hw/xquartz/bundle/Resources/sk.lproj/Localizable.strings       |binary
 hw/xquartz/bundle/Resources/sk.lproj/locversion.plist          |    4 
 hw/xquartz/bundle/Resources/sk.lproj/main.nib/designable.nib   | 7022 ++++-----
 hw/xquartz/bundle/Resources/sk.lproj/main.nib/keyedobjects.nib |binary
 hw/xquartz/bundle/Resources/th.lproj/InfoPlist.strings         |binary
 hw/xquartz/bundle/Resources/th.lproj/Localizable.strings       |binary
 hw/xquartz/bundle/Resources/th.lproj/locversion.plist          |   14 
 hw/xquartz/bundle/Resources/th.lproj/main.nib/designable.nib   | 3758 ++++
 hw/xquartz/bundle/Resources/th.lproj/main.nib/keyedobjects.nib |binary
 hw/xquartz/bundle/Resources/tr.lproj/InfoPlist.strings         |binary
 hw/xquartz/bundle/Resources/tr.lproj/Localizable.strings       |binary
 hw/xquartz/bundle/Resources/tr.lproj/locversion.plist          |   14 
 hw/xquartz/bundle/Resources/tr.lproj/main.nib/designable.nib   | 3611 ++++
 hw/xquartz/bundle/Resources/tr.lproj/main.nib/keyedobjects.nib |binary
 hw/xquartz/bundle/Resources/uk.lproj/InfoPlist.strings         |binary
 hw/xquartz/bundle/Resources/uk.lproj/Localizable.strings       |binary
 hw/xquartz/bundle/Resources/uk.lproj/locversion.plist          |   14 
 hw/xquartz/bundle/Resources/uk.lproj/main.nib/designable.nib   | 3492 ++++
 hw/xquartz/bundle/Resources/uk.lproj/main.nib/keyedobjects.nib |binary
 hw/xquartz/bundle/mk_bundke.sh                                 |    2 
 hw/xquartz/darwinEvents.c                                      |   22 
 hw/xquartz/darwinEvents.h                                      |    1 
 include/exevents.h                                             |    7 
 include/input.h                                                |    7 
 include/inputstr.h                                             |    5 
 include/list.h                                                 |  114 
 test/.gitignore                                                |    1 
 test/input.c                                                   |   12 
 test/list.c                                                    |  132 
 test/xi2/.gitignore                                            |    1 
 xfixes/cursor.c                                                |   16 
 87 files changed, 47591 insertions(+), 18749 deletions(-)

New commits:
commit b1be72c5ca6cb98ba64637990b142be0f1710a19
Author: Keith Packard <keithp@keithp.com>
Date:   Sun Mar 4 20:26:18 2012 -0800

    Version bumped to 1.12
    
    Signed-off-by: Keith Packard <keithp@keithp.com>

diff --git a/configure.ac b/configure.ac
index a44a12a..2693ce7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,8 +26,8 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.60)
-AC_INIT([xorg-server], 1.11.99.903, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2012-02-11"
+AC_INIT([xorg-server], 1.12.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2012-03-04"
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE

commit e08ed0b757b9b48344a301f612fabb3e39ffec78
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Sun Feb 26 17:51:50 2012 -0500

    test: add new test cases to .gitignore
    
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
    Signed-off-by: Keith Packard <keithp@keithp.com>

diff --git a/test/.gitignore b/test/.gitignore
index e5aa9ec..5d4fdfa 100644
--- a/test/.gitignore
+++ b/test/.gitignore
@@ -3,6 +3,7 @@ input
 list
 misc
 string
+touch
 xfree86
 xkb
 xtest
diff --git a/test/xi2/.gitignore b/test/xi2/.gitignore
index 3e9816d..817aa7b 100644
--- a/test/xi2/.gitignore
+++ b/test/xi2/.gitignore
@@ -8,3 +8,4 @@ protocol-xiqueryversion
 protocol-xiselectevents
 protocol-xisetclientpointer
 protocol-xiwarppointer
+xi2

commit 2416ee4a015068359807a10f433e8c54192c78a9
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Feb 22 15:32:56 2012 +1000

    dix: avoid NULL-pointer dereference on button-only devices (#38313)
    
    And for such devices simply take the last.valuators[] which must be valid at
    all times anyway. UpdateSlaveDeviceCoords takes care of that.
    
    X.Org Bug 38313 <http://bugs.freedesktop.org/show_bug.cgi?id=38313>
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>

diff --git a/dix/getevents.c b/dix/getevents.c
index 6ea4ba0..306d0ff 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -840,10 +840,15 @@ scale_to_desktop(DeviceIntPtr dev, ValuatorMask *mask,
     ScreenPtr scr = miPointerGetScreen(dev);
     double x, y;
 
-    BUG_WARN(!dev->valuator);
-    BUG_WARN(dev->valuator->numAxes < 2);
+    BUG_WARN(!dev->valuator || dev->valuator->numAxes < 2);
     if (!dev->valuator || dev->valuator->numAxes < 2)
+    {
+        /* if we have no axes, last.valuators must be in screen coords
+         * anyway */
+        *devx = *screenx = dev->last.valuators[0];
+        *devy = *screeny = dev->last.valuators[1];
         return scr;
+    }
 
     if (valuator_mask_isset(mask, 0))
         x = valuator_mask_get_double(mask, 0);
@@ -1493,8 +1498,6 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
 {
     CARD32 ms = GetTimeInMillis();
     int num_events = 0, nev_tmp;
-    int h_scroll_axis = pDev->valuator->h_scroll_axis;
-    int v_scroll_axis = pDev->valuator->v_scroll_axis;
     ValuatorMask mask;
     ValuatorMask scroll;
     int i;
@@ -1519,6 +1522,14 @@ GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type,
     {
         double val, adj;
         int axis;
+        int h_scroll_axis = -1;
+        int v_scroll_axis = -1;
+
+        if (pDev->valuator)
+        {
+            h_scroll_axis = pDev->valuator->h_scroll_axis;
+            v_scroll_axis = pDev->valuator->v_scroll_axis;
+        }
 
         /* Up is negative on valuators, down positive */
         switch (buttons) {

commit 38000e7d1f958f5944e641de3e716944a5876d41
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Tue Jan 31 11:06:21 2012 -0800

    Revert "dix: don't XWarpPointer through the last slave anymore (#38313)"
    
    This reverts commit 2bfb802839688ecf328119c4c6979390fc60348d.
    
    This commit caused a regression.
    
    See: http://xquartz.macosforge.org/trac/ticket/517#comment:10
    
    Acked-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/dix/events.c b/dix/events.c
index 9998845..9244795 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -3449,21 +3449,16 @@ XineramaWarpPointer(ClientPtr client)
 {
     WindowPtr	dest = NULL;
     int		x, y, rc;
-    DeviceIntPtr dev;
-    SpritePtr   pSprite;
+    SpritePtr   pSprite = PickPointer(client)->spriteInfo->sprite;
 
     REQUEST(xWarpPointerReq);
 
+
     if (stuff->dstWid != None) {
 	rc = dixLookupWindow(&dest, stuff->dstWid, client, DixReadAccess);
 	if (rc != Success)
 	    return rc;
     }
-
-    /* Post through the XTest device */
-    dev = PickPointer(client);
-    dev = GetXTestDevice(dev);
-    pSprite = dev->spriteInfo->sprite;
     x = pSprite->hotPhys.x;
     y = pSprite->hotPhys.y;
 
@@ -3513,9 +3508,9 @@ XineramaWarpPointer(ClientPtr client)
     else if (y >= pSprite->physLimits.y2)
 	y = pSprite->physLimits.y2 - 1;
     if (pSprite->hotShape)
-	ConfineToShape(dev, pSprite->hotShape, &x, &y);
+	ConfineToShape(PickPointer(client), pSprite->hotShape, &x, &y);
 
-    XineramaSetCursorPosition(dev, x, y, TRUE);
+    XineramaSetCursorPosition(PickPointer(client), x, y, TRUE);
 
     return Success;
 }
@@ -3533,7 +3528,7 @@ ProcWarpPointer(ClientPtr client)
     WindowPtr	dest = NULL;
     int		x, y, rc;
     ScreenPtr	newScreen;
-    DeviceIntPtr dev, tmp, xtest_dev = NULL;
+    DeviceIntPtr dev, tmp;
     SpritePtr   pSprite;
 
     REQUEST(xWarpPointerReq);
@@ -3546,13 +3541,11 @@ ProcWarpPointer(ClientPtr client)
 	    rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixWriteAccess);
 	    if (rc != Success)
 		return rc;
-            if (IsXTestDevice(tmp, dev))
-                xtest_dev = tmp;
 	}
     }
 
-    /* Use the XTest device to actually move the pointer */
-    dev = xtest_dev;
+    if (dev->lastSlave)
+        dev = dev->lastSlave;
     pSprite = dev->spriteInfo->sprite;
 
 #ifdef PANORAMIX

commit cb6a32da27f09261c4d561c19d1877c750d98cc3
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Feb 17 13:44:12 2012 -0800

    XQuartz: Short-circuit activateX:
    
    This also avoids a deadlock when calling activateX: before the server
    thread has initialized
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 5b38eae..048e787 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -191,6 +191,9 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
 }
 
 - (void) activateX:(OSX_BOOL)state {
+    if (_x_active == state)
+        return;
+
     DEBUG_LOG("state=%d, _x_active=%d, \n", state, _x_active);
     if (state) {
         if(bgMouseLocationUpdated) {

commit 1562c4a1ca748d2c4a8c69d57ba09ff7ca9cc453
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Feb 17 13:54:57 2012 -0800

    XQuartz: Actually install the new locales
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/hw/xquartz/bundle/mk_bundke.sh b/hw/xquartz/bundle/mk_bundke.sh
index 58d5f6a..288c6a9 100755
--- a/hw/xquartz/bundle/mk_bundke.sh
+++ b/hw/xquartz/bundle/mk_bundke.sh
@@ -6,7 +6,7 @@ SRCDIR=$1
 BUILDDIR=$2
 BUNDLE_ROOT=$3
 
-localities="Dutch English French German Italian Japanese Spanish da fi ko no pl pt pt_PT ru sv zh_CN zh_TW"
+localities="Dutch English French German Italian Japanese Spanish ar ca cs da el fi he hr hu ko no pl pt pt_PT ro ru sk sv th tr uk zh_CN zh_TW"
 for lang in ${localities} ; do
     [ -d ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj ] && rm -rf ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj
     mkdir -p ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/main.nib

commit eaba06a27c5520a02f08431ac1e4b0e0bdc22cd8
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Mon Feb 13 16:00:48 2012 -0800

    Keep virtual core pointer touch class around if new slave doesn't have one
    
    The VCP may have active touch grabs. The touch records must be kept so
    these touch grabs may be accepted/rejected in the future. This means the
    touch class list will not represent the touch class of the attached
    slave device if it does not have a touch class, but we already were
    breaking that assumption by keeping a separate touches array for the
    VCP.
    
    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>

diff --git a/Xi/exevents.c b/Xi/exevents.c
index ca8060d..f390f67 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -704,13 +704,10 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to)
         t->motionMask = f->motionMask;
         /* to->touches and to->num_touches are separate on the master,
          * don't copy */
-    } else if (to->touch)
-    {
-        ClassesPtr classes;
-        classes = to->unused_classes;
-        classes->touch = to->touch;
-        to->touch      = NULL;
     }
+    /* Don't remove touch class if from->touch is non-existent. The to device
+     * may have an active touch grab, so we need to keep the touch class record
+     * around. */
 }
 
 /**

commit 8573b3519af138a3a12a2e77098718165f9fd8ff
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Feb 13 16:00:47 2012 -0800

    Don't clobber virtual core pointer touches array length
    
    The VCP has its own touches array, don't overwrite it when the class is
    copied from the SD to the master.
    
    Reported-by: Chase Douglas <chase.douglas@canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 816dfa7..ca8060d 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -671,7 +671,7 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to)
 
     if (from->touch)
     {
-        TouchPointInfoPtr tmp;
+        TouchClassPtr t, f;
         if (!to->touch)
         {
             classes = to->unused_classes;
@@ -692,10 +692,18 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to)
             } else
                 classes->touch = NULL;
         }
-        tmp = to->touch->touches;
-        memcpy(to->touch, from->touch, sizeof(TouchClassRec));
-        to->touch->touches = tmp;
-        to->touch->sourceid = from->id;
+
+
+        t = to->touch;
+        f = from->touch;
+        t->sourceid = f->sourceid;
+        t->max_touches = f->max_touches;
+        t->mode = f->mode;
+        t->buttonsDown = f->buttonsDown;
+        t->state = f->state;
+        t->motionMask = f->motionMask;
+        /* to->touches and to->num_touches are separate on the master,
+         * don't copy */
     } else if (to->touch)
     {
         ClassesPtr classes;

commit 03d32fe7a718d9016053cdb5d57f51a74ef99b59
Author: Chase Douglas <chase.douglas@ubuntu.com>
Date:   Mon Feb 13 12:09:32 2012 -0800

    Don't dereference a touch after it has been ended when punting to next owner
    
    In this case, we have ended the touch because the last owner has
    rejected it. We need to return from the function right now so we don't
    attempt to dereference another touch client for early acceptance
    processing.
    
    Signed-off-by: Chase Douglas <chase.douglas@ubuntu.com>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/Xi/exevents.c b/Xi/exevents.c
index de7d50a..816dfa7 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1164,6 +1164,7 @@ TouchPuntToNextOwner(DeviceIntPtr dev, TouchPointInfoPtr ti,
     {
         EmitTouchEnd(dev, ti, 0, 0);
         TouchEndTouch(dev, ti);
+        return;
     }
 
     if (ti->listeners[0].state == LISTENER_EARLY_ACCEPT)

commit 1ecb7aaf2adedad1996cd26176ef5802113e3ad9
Author: Chase Douglas <chase.douglas@ubuntu.com>
Date:   Sat Feb 11 07:58:38 2012 -0800

    Focus event button state must show the logical buttons, not physical buttons
    
    Similar to the fix in fcda98c48610fd507ca0b89c6006a5497d9dc1c9. This
    ensures we show the correct logical state of the buttons in device focus
    events too.
    
    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>

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 1ecc3ba..de7d50a 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -2215,7 +2215,7 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail,
 
     for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++)
         if (BitIsOn(mouse->button->down, i))
-            SetBit(&xi2event[1], i);
+            SetBit(&xi2event[1], mouse->button->map[i]);
 
     if (dev->key)
     {

commit 6f28388187cffae9e5bc9bfc9425acff4f478b59
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Sat Feb 11 01:29:26 2012 +1000

    dix: reset last.scroll when resetting the valuator (#45611)
    
    last.scroll remained on the last-submitted scrolling value but last.valuator
    was changed whenever the slave device changed. The first scrolling delta
    after a switch was then calculated as (last.scroll - new abs value), causing
    erroneous scrolling events.
    
    Test case:
    - synaptics with a scrolling method enabled, other device with 3+ axes (e.g.
      wacom)
    - scroll on touchpad
    - use other device
    - scroll on touchpad
    
    The second scroll caused erroneous button press/release events.
    
    X.Org Bug 45611 <http://bugs.freedesktop.org/show_bug.cgi?id=45611>
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>

diff --git a/dix/getevents.c b/dix/getevents.c
index 7678aa1..6ea4ba0 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -360,6 +360,7 @@ updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr pDev)
             if (i >= lastSlave->valuator->numAxes)
             {
                 pDev->last.valuators[i] = 0;
+                valuator_mask_set_double(pDev->last.scroll, i, 0);
             }
             else
             {
@@ -367,6 +368,7 @@ updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr pDev)
                 val = rescaleValuatorAxis(val, lastSlave->valuator->axes + i,
                                           pDev->valuator->axes + i, 0, 0);
                 pDev->last.valuators[i] = val;
+                valuator_mask_set_double(pDev->last.scroll, i, val);
             }
         }
     }

commit d53235af85d50774c68347720ce132daf9a5bc49
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Mon Feb 13 23:06:07 2012 -0800

    XQuartz: Build fix for possible conflict of BOOL type
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

diff --git a/hw/xquartz/GL/capabilities.c b/hw/xquartz/GL/capabilities.c
index dd3f855..b718a41 100644
--- a/hw/xquartz/GL/capabilities.c
+++ b/hw/xquartz/GL/capabilities.c
@@ -23,17 +23,20 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <assert.h>
+
+#define Cursor Mac_Cursor
+#define BOOL Mac_BOOL
 #include <OpenGL/OpenGL.h>
 #include <OpenGL/gl.h>
 #include <OpenGL/glu.h>
 #include <OpenGL/glext.h>
 #include <ApplicationServices/ApplicationServices.h>
+#undef Cursor
+#undef BOOL
 
 #include "capabilities.h"
 
-#define Cursor X_Cursor
 #include "os.h"
-#undef Cursor
 
 static void handleBufferModes(struct glCapabilitiesConfig *c, GLint bufferModes) {
     if(bufferModes & kCGLStereoscopicBit) {

commit 62edd970f6f36058fcb31de4555eb7c1329cce74
Author: Keith Packard <keithp@keithp.com>
Date:   Sat Feb 11 16:13:44 2012 +1300

    Bump to version 1.11.99.903 (1.12 RC3)
    
    Signed-off-by: Keith Packard <keithp@keithp.com>

diff --git a/configure.ac b/configure.ac
index 7e48d44..a44a12a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -26,8 +26,8 @@ dnl
 dnl Process this file with autoconf to create configure.
 
 AC_PREREQ(2.60)
-AC_INIT([xorg-server], 1.11.99.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
-RELEASE_DATE="2012-01-27"
+AC_INIT([xorg-server], 1.11.99.903, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server)
+RELEASE_DATE="2012-02-11"
 AC_CONFIG_SRCDIR([Makefile.am])
 AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE

commit 7674d00b04da5cf73cfa5c7ed1d3a9f42b59960e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Jan 27 12:41:09 2012 +1000

    Xi: handle new XIAllowEvents request in inputproto 2.1.99.6
    
    grab_window and touchid were removed from the struct for ABI compatibility
    reasons, we need to pull in the new, XI 2.2-specific struct.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>

diff --git a/Xi/xiallowev.c b/Xi/xiallowev.c
index 38967b2..d0856b6 100644
--- a/Xi/xiallowev.c
+++ b/Xi/xiallowev.c
@@ -41,6 +41,7 @@
 #include <X11/extensions/XI2proto.h>
 
 #include "exglobals.h" /* BadDevice */
+#include "exevents.h"
 #include "xiallowev.h"
 
 int
@@ -51,8 +52,12 @@ SProcXIAllowEvents(ClientPtr client)
     swaps(&stuff->length);
     swaps(&stuff->deviceid);
     swapl(&stuff->time);
-    /* FIXME swap touchid */
-    /* FIXME swap window */
+    if (stuff->length > 3)
+    {
+        xXI2_2AllowEventsReq *req_xi22 = (xXI2_2AllowEventsReq*)stuff;
+        swapl(&req_xi22->touchid);
+        swapl(&req_xi22->grab_window);
+    }
 
     return ProcXIAllowEvents(client);
 }
@@ -63,9 +68,21 @@ ProcXIAllowEvents(ClientPtr client)
     TimeStamp time;
     DeviceIntPtr dev;
     int ret = Success;
+    XIClientPtr xi_client;
+    Bool have_xi22 = FALSE;
+    REQUEST(xXI2_2AllowEventsReq);
 
-    REQUEST(xXIAllowEventsReq);
-    /* FIXME: check request length, 12 for XI 2.0+, 20 for XI 2.2+ */
+    xi_client = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey);
+
+    if (version_compare(xi_client->major_version,
+                        xi_client->minor_version, 2, 2) >= 0)
+    {
+        REQUEST_AT_LEAST_SIZE(xXI2_2AllowEventsReq);
+        have_xi22 = TRUE;
+    } else
+    {
+        REQUEST_SIZE_MATCH(xXIAllowEventsReq);
+    }
 
     ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
     if (ret != Success)
@@ -97,8 +114,20 @@ ProcXIAllowEvents(ClientPtr client)
 	break;
     case XIRejectTouch:
     case XIAcceptTouch:
-        ret = TouchAcceptReject(client, dev, stuff->mode, stuff->touchid,
-                                stuff->grab_window, &client->errorValue);
+        {
+            int rc;
+            WindowPtr win;
+
+            if (!have_xi22)
+                return BadValue;
+
+            rc = dixLookupWindow(&win, stuff->grab_window, client, DixReadAccess);
+            if (rc != Success)
+                return rc;
+
+            ret = TouchAcceptReject(client, dev, stuff->mode, stuff->touchid,
+                                    stuff->grab_window, &client->errorValue);
+        }
         break;
     default:
 	client->errorValue = stuff->mode;
diff --git a/configure.ac b/configure.ac
index 6241119..7e48d44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -776,7 +776,7 @@ XPROTO="xproto >= 7.0.22"
 RANDRPROTO="randrproto >= 1.2.99.3"
 RENDERPROTO="renderproto >= 0.11"
 XEXTPROTO="xextproto >= 7.1.99"
-INPUTPROTO="inputproto >= 2.1.99.5"
+INPUTPROTO="inputproto >= 2.1.99.6"
 KBPROTO="kbproto >= 1.0.3"
 FONTSPROTO="fontsproto"
 FIXESPROTO="fixesproto >= 5.0"

commit ceb026c6a6f1eea8b34e745f06f1ebcd652c0ba1
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Jan 27 12:41:09 2012 +1000

    Xi: handle new XIAllowEvents request in inputproto 2.1.99.6
    
    grab_window and touchid were removed from the struct for ABI compatibility
    reasons, we need to pull in the new, XI 2.2-specific struct.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/Xi/xiallowev.c b/Xi/xiallowev.c
index 38967b2..d0856b6 100644
--- a/Xi/xiallowev.c
+++ b/Xi/xiallowev.c
@@ -41,6 +41,7 @@
 #include <X11/extensions/XI2proto.h>
 
 #include "exglobals.h" /* BadDevice */
+#include "exevents.h"
 #include "xiallowev.h"
 
 int
@@ -51,8 +52,12 @@ SProcXIAllowEvents(ClientPtr client)
     swaps(&stuff->length);
     swaps(&stuff->deviceid);
     swapl(&stuff->time);
-    /* FIXME swap touchid */
-    /* FIXME swap window */
+    if (stuff->length > 3)
+    {
+        xXI2_2AllowEventsReq *req_xi22 = (xXI2_2AllowEventsReq*)stuff;
+        swapl(&req_xi22->touchid);
+        swapl(&req_xi22->grab_window);
+    }
 
     return ProcXIAllowEvents(client);
 }
@@ -63,9 +68,21 @@ ProcXIAllowEvents(ClientPtr client)
     TimeStamp time;
     DeviceIntPtr dev;
     int ret = Success;
+    XIClientPtr xi_client;
+    Bool have_xi22 = FALSE;
+    REQUEST(xXI2_2AllowEventsReq);
 
-    REQUEST(xXIAllowEventsReq);
-    /* FIXME: check request length, 12 for XI 2.0+, 20 for XI 2.2+ */
+    xi_client = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey);
+
+    if (version_compare(xi_client->major_version,
+                        xi_client->minor_version, 2, 2) >= 0)
+    {
+        REQUEST_AT_LEAST_SIZE(xXI2_2AllowEventsReq);
+        have_xi22 = TRUE;
+    } else
+    {
+        REQUEST_SIZE_MATCH(xXIAllowEventsReq);
+    }
 
     ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
     if (ret != Success)
@@ -97,8 +114,20 @@ ProcXIAllowEvents(ClientPtr client)
 	break;
     case XIRejectTouch:
     case XIAcceptTouch:
-        ret = TouchAcceptReject(client, dev, stuff->mode, stuff->touchid,
-                                stuff->grab_window, &client->errorValue);
+        {
+            int rc;
+            WindowPtr win;
+
+            if (!have_xi22)
+                return BadValue;
+
+            rc = dixLookupWindow(&win, stuff->grab_window, client, DixReadAccess);
+            if (rc != Success)
+                return rc;
+
+            ret = TouchAcceptReject(client, dev, stuff->mode, stuff->touchid,
+                                    stuff->grab_window, &client->errorValue);
+        }
         break;
     default:
 	client->errorValue = stuff->mode;
diff --git a/configure.ac b/configure.ac
index 6241119..7e48d44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -776,7 +776,7 @@ XPROTO="xproto >= 7.0.22"
 RANDRPROTO="randrproto >= 1.2.99.3"
 RENDERPROTO="renderproto >= 0.11"
 XEXTPROTO="xextproto >= 7.1.99"
-INPUTPROTO="inputproto >= 2.1.99.5"
+INPUTPROTO="inputproto >= 2.1.99.6"
 KBPROTO="kbproto >= 1.0.3"
 FONTSPROTO="fontsproto"
 FIXESPROTO="fixesproto >= 5.0"

commit b96275c4cdb164aa71f7aa9fbf88be18886d1936
Author: Benjamin Otte <otte@redhat.com>
Date:   Tue Feb 7 18:01:25 2012 +1000

    dix: fix an out-of-memory crash
    
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/dix/inpututils.c b/dix/inpututils.c
index d279c1d..9e0c551 100644
--- a/dix/inpututils.c
+++ b/dix/inpututils.c
@@ -432,6 +432,9 @@ valuator_mask_new(int num_valuators)
      * flying-car future, when we can dynamically alloc the masks and are
      * not constrained by signals, we can start using num_valuators */
     ValuatorMask *mask = calloc(1, sizeof(ValuatorMask));
+    if (mask == NULL)
+        return NULL;
+
     mask->last_bit = -1;
     return mask;
 }

commit 6241b5e4fdbdb08d30cc8787d858ac27122d2d49
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Fri Feb 3 16:19:11 2012 -0800

    Implement touch early accept
    
    This doesn't really implement early accept as it should. Ideally, the
    server should send end events to all subsequent touch clients as soon as
    an early accept comes in. However, this implementation is still protocol
    compliant. We can always improve it later.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/Xi/exevents.c b/Xi/exevents.c
index b0832d0..1ecc3ba 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1088,6 +1088,27 @@ DeliverOneTouchEvent(ClientPtr client, DeviceIntPtr dev, TouchPointInfoPtr ti,
     return TRUE;
 }
 
+static void
+ActivateEarlyAccept(DeviceIntPtr dev, TouchPointInfoPtr ti)
+{
+    int rc;
+    ClientPtr client;
+    XID error;
+
+    rc = dixLookupClient(&client, ti->listeners[0].listener, serverClient,
+                         DixSendAccess);
+    if (rc != Success)
+    {
+        ErrorF("[Xi] Failed to lookup early accepting client.\n");
+        return;
+    }
+
+    if (TouchAcceptReject(client, dev, XIAcceptTouch, ti->client_id,
+                          ti->listeners[0].window->drawable.id, &error) !=
+        Success)
+        ErrorF("[Xi] Failed to accept touch grab after early acceptance.\n");
+}
+
 /**
  * Generate and deliver a TouchEnd event.
  *
@@ -1130,7 +1151,8 @@ TouchPuntToNextOwner(DeviceIntPtr dev, TouchPointInfoPtr ti,
                      TouchOwnershipEvent *ev)
 {
     /* Deliver the ownership */
-    if (ti->listeners[0].state == LISTENER_AWAITING_OWNER)
+    if (ti->listeners[0].state == LISTENER_AWAITING_OWNER ||
+        ti->listeners[0].state == LISTENER_EARLY_ACCEPT)
         DeliverTouchEvents(dev, ti, (InternalEvent*)ev, ti->listeners[0].listener);
     else if (ti->listeners[0].state == LISTENER_AWAITING_BEGIN)
         TouchEventHistoryReplay(ti, dev, ti->listeners[0].listener);
@@ -1143,6 +1165,9 @@ TouchPuntToNextOwner(DeviceIntPtr dev, TouchPointInfoPtr ti,
         EmitTouchEnd(dev, ti, 0, 0);
         TouchEndTouch(dev, ti);
     }
+
+    if (ti->listeners[0].state == LISTENER_EARLY_ACCEPT)
+        ActivateEarlyAccept(dev, ti);
 }
 
 /**
diff --git a/dix/touch.c b/dix/touch.c
index f55bb8c..d04801c 100644
--- a/dix/touch.c
+++ b/dix/touch.c
@@ -1022,12 +1022,11 @@ TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode,
     if (i > 0)
     {
         if (mode == XIRejectTouch)
-        {
             TouchRejected(dev, ti, ti->listeners[i].listener, NULL);
-            return Success;
-        }
-        /* FIXME: Implement early accept */
-        return BadAccess;
+        else
+            ti->listeners[i].state = LISTENER_EARLY_ACCEPT;
+
+        return Success;
     }
 
     nev = GetTouchOwnershipEvents(events, dev, ti, mode,
diff --git a/include/input.h b/include/input.h
index fea5a31..b7825a7 100644
--- a/include/input.h
+++ b/include/input.h
@@ -583,6 +583,8 @@ extern _X_EXPORT void FreeInputAttributes(InputAttributes *attrs);
 enum TouchListenerState{
     LISTENER_AWAITING_BEGIN = 0,   /**< Waiting for a TouchBegin event */
     LISTENER_AWAITING_OWNER,       /**< Waiting for a TouchOwnership event */
+    LISTENER_EARLY_ACCEPT,         /**< Waiting for ownership, has already
+                                        accepted */
     LISTENER_IS_OWNER,             /**< Is the current owner */
     LISTENER_HAS_END,              /**< Has already received the end event */
 };

commit b0c54856df71f9cabf9dad176fdade960ef8c5d9
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Fri Feb 3 16:19:10 2012 -0800

    Implement early touch reject
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/dix/touch.c b/dix/touch.c
index 7daf81b..f55bb8c 100644
--- a/dix/touch.c
+++ b/dix/touch.c
@@ -1019,9 +1019,16 @@ TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode,
     if (i == ti->num_listeners)
         return BadAccess;
 
-    /* FIXME: Implement early accept/reject */
     if (i > 0)
+    {
+        if (mode == XIRejectTouch)
+        {
+            TouchRejected(dev, ti, ti->listeners[i].listener, NULL);
+            return Success;
+        }
+        /* FIXME: Implement early accept */
         return BadAccess;
+    }
 
     nev = GetTouchOwnershipEvents(events, dev, ti, mode,
                                   ti->listeners[0].listener, 0);

commit 656ab879f20892975510723ce8fe78faf64aadb4
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Fri Feb 3 16:19:09 2012 -0800

    Check for proper window ID when processing touch allow requests
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/Xi/xiallowev.c b/Xi/xiallowev.c
index dab3393..38967b2 100644
--- a/Xi/xiallowev.c
+++ b/Xi/xiallowev.c
@@ -98,7 +98,7 @@ ProcXIAllowEvents(ClientPtr client)
     case XIRejectTouch:
     case XIAcceptTouch:
         ret = TouchAcceptReject(client, dev, stuff->mode, stuff->touchid,
-                                &client->errorValue);
+                                stuff->grab_window, &client->errorValue);
         break;
     default:
 	client->errorValue = stuff->mode;
diff --git a/dix/touch.c b/dix/touch.c
index 4a116ee..7daf81b 100644
--- a/dix/touch.c
+++ b/dix/touch.c
@@ -988,7 +988,7 @@ TouchListenerGone(XID resource)
 
 int
 TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode,
-                  uint32_t touchid, XID *error)
+                  uint32_t touchid, Window grab_window, XID *error)
 {
     TouchPointInfoPtr ti;
     int nev, i;
@@ -1003,8 +1003,6 @@ TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode,
         return BadDevice;
     }
 
-    /* FIXME window is unhandled */
-
     ti = TouchFindByClientID(dev, touchid);
     if (!ti)
     {
@@ -1012,9 +1010,17 @@ TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode,
         return BadValue;
     }
 
-    /* FIXME: Allow for early accept */
-    if (ti->num_listeners == 0 ||
-        CLIENT_ID(ti->listeners[0].listener) != client->index)
+    for (i = 0; i < ti->num_listeners; i++)
+    {
+        if (CLIENT_ID(ti->listeners[i].listener) == client->index &&


Reply to: