commit 9acb64f54ee9dd2fe41afda159b919280850ad8e
Author: Matt Dew <marcoz@osource.org>
Date:   Thu Sep 12 21:17:40 2013 -0600

    bump version from 1.14.2.902 to 1.14.3

commit af1c57152e10cfa55843e6330cffc6a3c8c517d3
Author: Chris Clayton <chris2553@googlemail.com>
Date:   Wed Sep 4 15:42:04 2013 +1000

    kdrive: fix build error on gcc 4.8 for out-of-bounds array access
    
    I'm getting a error building xorg-server-1.14.1.902 with thelatest snapshot
    of gcc-4.8:
    
    input.c:225:43: error: array subscript is above array bounds
    [-Werror=array-bounds]
    
    This is because kdNumInputFds can become equal to KD_MAX_INPUT_FDS in
    KdRegisterFd(). This means that in KdUnregisterFd(), kdInputFds[j + 1] can
    be beyond the end of the array.
    
    Signed-off-by: Chris Clayton <chris2553@googlemail.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

commit 0e37fefea5e91dfdcd18ffd941daa7d05cc3180d
Author: Matt Dew <marcoz@osource.org>
Date:   Thu Aug 22 17:43:51 2013 -0600

    bump rev number from 1.14.2.901 to 1.14.2.902

commit 917c11ff97eb302d3c2d0565c8dd6d93101d6466
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Tue Jul 30 15:31:24 2013 +0200

    test/xi2: fix protocol-xiqueryversion test
    
    The old code was broken and allowed setting client version >= XIVersion,
    this was fixed in the previous patch, but updating the value for XIVersion
    broke the tests, so fix the tests too.
    
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@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 b6e5c4669e0db391966deb397e8c975ec7f0124d)

commit 804836c53083fdb9f43be6f51740df5d12d57cb4
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Tue Jul 30 14:45:21 2013 +0200

    Xi: Clamp XIClient maximal version to XIVersion
    
    Do not allow setting client version to an arbitrary value >= XIVersion.
    Fixes a test error with test/xi2/protocol-xiqueryversion.c, introduced by
    commit 4360514d1c "Xi: Allow clients to ask for 2.3 and then 2.2 without failing"
    
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 500e844a24962c9e70abb3d614f1973013b2de73)

commit 7250c310b50c96709f2082e7752fc889557abc26
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Aug 13 10:50:25 2013 +1000

    Revert "test: fix XIQueryVersion check for new behaviour"
    
    This reverts commit cdcb708678c4785cd7b026b90e316691176e5244.

commit cdcb708678c4785cd7b026b90e316691176e5244
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jul 30 08:03:12 2013 +1000

    test: fix XIQueryVersion check for new behaviour
    
    As of 4360514d1cc8e3132f93f56172d291074e8c770f, XIQueryVersion supports
    requesting versions 2.2+ in random order, only 2.0 and 2.1 are restricted.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit a5abf790183798ad8aa2c29c056df3647777cfbd)

commit e6da18f67516dcee394cd0eff591a255b59fe544
Author: Keith Packard <keithp@keithp.com>
Date:   Wed Jul 10 22:42:55 2013 -0700

    Xi: Allow clients to ask for 2.3 and then 2.2 without failing
    
    This allows different sub-systems within the same application to
    request different Xi versions without either getting old behaviour
    everywhere or simply failing with a BadValue.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 4360514d1cc8e3132f93f56172d291074e8c770f)

commit 0857f3c72d0d1bf5eac52f084e9a1adf077e7397
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Jul 22 13:43:07 2013 +1000

    dix: set the valuator mask to ensure XI 1.x events have data
    
    XI 1.x only allows for first + num valuators, so if a device sends data for
    valuators 0 and 2+ only (i.e. valuator 1 is missing) we still need to get
    the data for that from somewhere.
    XI 1.x uses the hack of an unset valuator mask to get the right coordinates,
    i.e. we set the value but don't set the mask for it so XI2 events have the
    right mask.
    
    For an absolute device in relative mode, this broke in b28a1af55cf, the
    value was now always 0. This wasn't visible on the cursor, only in an XI 1.x
    client. The GIMP e.g. sees jumps to x/0 every few events.
    
    Drop the condition introduced in b28a1af55cf, data in valuators is always
    absolute, regardless of the mode.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 3d8756631070c440cefa31b35fea3d407f187810)

commit ef54bd89b17f3dd1f854435339f66d357121c64c
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Jul 24 11:50:00 2013 +1000

    dix: check the xi2mask, not the grab type for touch listeners
    
    grab->type is only non-zero for passive grabs. We're checking an active grab
    here, so we need to check if the touch mask is set on the grab.
    
    Test case: grab the device, then start two simultaneous touches. The
    grabbing client won't see the second touchpoints because grab->type is 0
    and the second touch is not an emulating pointer.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 4fb686d6a6777950f0e0d55b848cd2af4cbad372)

commit bc41226f7741098e55a3b0df924986991576d50a
Merge: 4ebd618 2cd62dc
Author: Matt Dew <marcoz@osource.org>
Date:   Thu Jul 25 22:56:24 2013 -0600

    Merge branch 'server-1.14-touch-fixes' of git://people.freedesktop.org/~whot/xserver into server-1.14-branch

commit 4ebd618bc5ef71507e708e7191091828eca3a7e8
Author: Matt Dew <marcoz@osource.org>
Date:   Thu Jul 25 22:24:00 2013 -0600

    Bah, bad rev number. Fixed:  changed 1.14.3-rc1 to 1.14.2.901

commit fef66ffe7a7e899a9126a1e431b94d881163b00d
Author: Matt Dew <marcoz@osource.org>
Date:   Thu Jul 25 22:02:26 2013 -0600

    bump rev from 1.14.2 to 1.14.3-rc1

commit 2cd62dc02b67c70d2417b2ccd307ead9596a2967
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Mar 1 08:43:58 2013 +1000

    Xi: return !Success from DeliverTouchEmulatedEvent if we didn't deliver
    
    All callers currently ignore the new value, so this patch has no effect.
    Inverse call graph:
    
    DeliverTouchEmulatedEvent
            DeliverEmulatedMotionEvent              Ignores value
            DeliverTouchBeginEvent
                    DeliverTouchEvent
                            DeliverTouchEvents      Ignores value
            DeliverTouchEndEvent
                    DeliverTouchEvent
                            DeliverTouchEvents      Ignores value
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 9978b57b8d94f061d72a67b99a02b0ba16a11429)

commit c203568905bcbb65fb1e079b626d2c1e90ecb72d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon May 13 15:22:12 2013 +1000

    Xi: fix warning - remove unused 'rc'
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit fd5ea0237db6d725a48f76b706135df9d3246b82)

commit 93f063c40dc4b339ae9114551071c57b52d98dba
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Jul 12 14:10:10 2013 +1000

    dix: UpdateTouchesForGrab must only free the listener grab if it is non-NULL
    
    If a client calls XIGrabDevice in response to a ButtonPress event (regular
    event selection), the device will have a grab, but listener->grab is NULL.
    
    Check for that, to avoid logspam.
    
    [ 26293.863] (EE) BUG: triggered 'if (!pGrab)'
    [ 26293.863] (EE) BUG: grabs.c:256 in FreeGrab()
    [ 26293.863] (EE)
    [ 26293.863] (EE) Backtrace:
    [ 26293.864] (EE) 0: /usr/bin/Xorg (FreeGrab+0x54) [0x45d3fc]
    [ 26293.864] (EE) 1: /usr/bin/Xorg (UpdateTouchesForGrab+0x135) [0x447d4e]
    [ 26293.864] (EE) 2: /usr/bin/Xorg (ActivatePointerGrab+0x1ba) [0x447f3d]
    [ 26293.864] (EE) 3: /usr/bin/Xorg (GrabDevice+0x3e6) [0x4503bc]
    [ 26293.864] (EE) 4: /usr/bin/Xorg (ProcXIGrabDevice+0x1f9) [0x5981b1]
    [ 26293.865] (EE) 5: /usr/bin/Xorg (ProcIDispatch+0x78) [0x58aa17]
    [ 26293.865] (EE) 6: /usr/bin/Xorg (Dispatch+0x30d) [0x43347e]
    [ 26293.865] (EE) 7: /usr/bin/Xorg (main+0x61d) [0x498175]
    [ 26293.865] (EE) 8: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x3df5621b75]
    [ 26293.865] (EE) 9: /usr/bin/Xorg (_start+0x29) [0x423a19]
    [ 26293.866] (EE) 10: ? (?+0x29) [0x29]
    [ 26293.866] (EE)
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 0e3be0b25fcfeff386bad132526352c2e45f1932)

commit ecd178e632a99ae2f12d2d9b6e9a48eaa421335d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jul 9 13:27:19 2013 +1000

    dix: when ungrabbing an active grab, accept pointer grabs (#66720)
    
    Ungrabbing a device during an active touch grab rejects the grab. Ungrabbing
    a device during an active pointer grab accepts the grab.
    
    Rejection is not really an option for a pointer-emulated grab, if a client
    has a button mask on the window it would get a ButtonPress emulated after
    UngrabDevice. That is against the core grab behaviour.
    
    X.Org Bug 66720 <http://bugs.freedesktop.org/show_bug.cgi?id=66720>
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
    (cherry picked from commit 8eeaa74bc241acb41f1d3ed64971e0b01e794776)

commit 54a7ae04a8475df6ce87e52ff995de22fafc7c92
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon May 27 13:46:49 2013 +1000

    dix: remove logspam in RefCursor()
    
    This shouldn't have been in the patch
    
    Reported-by: Colin Harrison <colin.harrison@virgin.net>
    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>
    (cherry picked from commit c21344add2fc589df83b29be5831c36a372201bd)

commit 1e29b269fd712ae1e3552eeddd3529015baee7ae
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed May 15 19:01:11 2013 +1000

    Abstract cursor refcounting
    
    Too many callers relied on the refcnt being handled correctly. Use a simple
    wrapper to handle that case.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 9a5ad65330693b3273972b63d10f2907d9ab954a)

commit c0be1168fd3dd2eb01187789ddc30d7aab909a98
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue May 14 14:51:31 2013 +1000

    dix: call UpdateDeviceState() for emulated TouchEndEvents
    
    ProcessTouchEvents() calls UDS for all touch events, but if the event type
    was switched to TouchUpdate(pending end) UDS is a noop.
    
    Daniel Drake found this can cause stuck buttons if a touch grab is
    activated, rejected and the touch event is passed to a regular listener.
    This sequence causes the TouchEnd to be changed to TouchUpdate(pending end).
    
    The actual TouchEnd event is later generated by the server once it is passed
    to the next listener. UDS is never called for this event, thus the button
    remains logically down.
    
    A previous patch suggested for UDS to handle TouchUpdate events [1], however
    this would release the button when the first TouchEvent is processed, not
    when the last grab has been released (as is the case for sync pointer
    grabs). A client may thus have the grab on the device, receive a ButtonPress
    but see the button logically up in an XQueryPointer request.
    
    This patch adds a call to UDS to TouchEmitTouchEnd(). The device state must
    be updated once a TouchEnd event was sent to the last grabbing listener and
    the number of grabs on the touchpoint is 0.
    
    [1] http://patchwork.freedesktop.org/patch/13464/
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 35c2e263db01b2b61354298e5e85aa3cae8ac317)

commit 5c32bd0e2c104deaa2820c62289916fff6a4e3cd
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri May 3 15:07:58 2013 +1000

    dix: fix cursor refcounting
    
    The cursor is referenced during CopyGrab(), thus doesn't need to be handled
    manually anymore. It does need to be refcounted for temp grabs though.
    
    The oldGrab handling in ProcGrabPointer is a leftover from the cursor in the
    grab being refcounted, but the grab itself being a static struct in the
    DeviceIntRec. Now that all grabs are copied, this lead to a double-free of
    the cursor (Reproduced in Thunderbird, dragging an email twice (or more
    often) causes a crash).
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 481702101b86fff003430e952dc65fb41eb56400)

commit 0ee9704f3c70fa7cf77edef55d158ad78df72a25
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri May 3 15:02:05 2013 +1000

    dix: free the old grab when activating a new grab
    
    A client may call XIGrabDevice twice, overwriting the existing grab. Thus,
    make sure we free the old copy after we copied it. Free it last, to make
    sure our refcounts don't run to 0 and inadvertantly free something on the
    way.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 3093f78d17e48a506aab170a9089cd10e21af299)

commit ef0fff102d1feb5bccffc918da5c0dc7c0d28f3b
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Apr 24 14:46:06 2013 +1000

    Xi: check for HAS_ACCEPTED only for grab listeners
    
    If we have one listener left but it's not a grab, it cannot be in
    LISTENER_HAS_ACCEPTED state.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 2566bdd8bc996cccde77b846819808c6239a89d2)

commit f3d63710d57aea0184ae07f0422a76b0fd6d415f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Apr 24 14:40:31 2013 +1000

    Move TouchListenerGone call to CloseDownClient
    
    TouchListenerGone cleans up if a client disappears. Having this in
    FreeGrab() triggers cyclic removal of grabs, emitting wrong events. In
    particular, it would clean up a passive grab record while that grab is
    active.
    
    Move it to CloseDownClient() instead, cleaning up before we go.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 5b00fc52270e9cfdfe7ac1838a21defe50fc3d31)

commit 6c880c143f6a32d3bbc529e4a0ab1663ddecf0a0
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Apr 24 12:53:52 2013 +1000

    dix: remove all listeners when freeing a touch
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 34c9b39d9937c2e19c2dffc9748605f90d40f965)

commit ab76a3a3fc56cf8f530e5ab9b6389b09da1cdc12
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Apr 17 20:15:35 2013 +1000

    dix: always copy grabs, don't reference them
    
    Introduced in xorg-server-1.13.99.901-2-g9ad0fdb. Storing the grab pointer
    in the listener turns out to be a bad idea. If the grab is not an active
    grab or an implicit grab, the pointer stored is the one to the grab attached
    on the window. This grab may be removed if the client calls UngrabButton or
    similar while the touch is still active, leaving a dangling pointer.
    
    To avoid this, copy the grab wherever we need to reference it later. This
    is also what we do for pointer/keyboard grabs, where we copy the grab as
    soon as it becomes active.
    
    Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 395124bd2782823de37e5c5b2f15dba49cff05f6)

commit 6bd9badc780ec9d1fb147dfa0c671979c75b722c
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Apr 23 15:52:18 2013 +1000

    dix: AllocGrab can copy if an argument is passed in
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 925e35122ebad877395bcf13676e9dbeb254bdfa)

commit 479f8bf236d17e2a2093d349d2ef6471ff089a53
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Apr 23 15:46:04 2013 +1000

    dix: freeing a null grab is a bug, complain if doing so
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 4980bcef9973ba1f90f53028f061669ee5d2661b)

commit 27752301377698124634d48b62ba7fcf8310caab
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Apr 23 15:39:32 2013 +1000

    dix: use a temporary variable for listeners[0]
    
    no functional changes
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit ccfa0f2d5de557546815a5e4f59552e2af46b578)

commit d8c0cc9bab1fe159f58c2b5e8056c2d94a623789
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Apr 18 10:32:11 2013 +1000

    dix: drop DeviceIntRec's activeGrab struct
    
    Obsolete since 4bc2761ad5ec2d0668aec639780ffb136605fbc8. This struct
    existed so copying a passive grab could be simply done by
      activeGrab = *grab
    
    and thus have a copy of the GrabPtr we'd get from various sources but still
    be able to check device->grab for NULL.
    
    Since 4bc2761 activeGrab is a pointer itself and points to the same memory
    as grabinfo->grab, leaving us with the potential of dangling pointers if
    either calls FreeGrab() and doesn't reset the other one.
    
    There is no reader of activeGrab anyway, so simply removing it is
    sufficient.
    
    Note: field is merely renamed to keep the ABI. Should be removed in the
    future.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 5363433a5cc64e2f83859aa1c32a89e5e1ddf9e4)

commit 25b641bb324c33226313c15448592b785043eaba
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Apr 17 20:14:56 2013 +1000

    dix: use a tmp variable for the to-be-removed touch listener
    
    No functional changes.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 7dbf61817d3bd4b1fc71710677e56c5d8cfcdb4e)

commit 88273287e1d7b3c06313f77d450f87a31bf53780
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Apr 17 20:13:34 2013 +1000

    dix: invert a loop condition
    
    Change the single if condition in the loop body to a
        if (!foo) continue;
    and re-indent the rest.
    
    No functional changes.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit a71a283934406d870bcd8dc376eb1c9ce1c8bbb4)

commit 4081b00d36d074eedf5c8d04196998d23cff28cf
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Feb 28 11:02:40 2013 +1000

    dix: XAllowEvents() on a touch event means accepting it
    
    A sync grab is the owner once it gets events. If it doesn't replay the
    event it will get all events from this touch, equivalent to accepting it.
    
    If the touch has ended before XAllowEvents() is called, we also now need to
    send the TouchEnd event and clean-up since we won't see anything more from
    this touch.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 5174b1f98204beee79eba74c4cda5f2be0a60a8f)

commit 8666395484d0ff68526b1afd0044329ca3e9c907
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Mar 1 12:52:35 2013 +1000

    dix: move EmitTouchEnd to touch.c
    
    No functional changes, this just enables it to be re-used easier.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit e7f79c48b0faea910dc881034c00eb807fcd6210)

commit 4dac09796ca7ec19c1a9b17f338babd51c999e2e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Mar 1 10:41:01 2013 +1000

    Xi: Don't emit a TouchEnd event to a frozen device
    
    EmitTouchEnd calls DeliverTouchEvents directly instead of through
    public.processInputProc. If a device is frozen, the TouchEnd is
    processed while the device is waiting for a XAllowEvents and thus ends the
    touch point (and the grab) before the client decided what to do with it. In
    the case of ReplayPointer, this loses the event.
    
    This is a hack, but making EmitTouchEnd use processInputProc breaks
    approximately everything, especially the touch point is cleaned up during
    ProcessTouchEvents. Working around that is a bigger hack than this.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 0eb9390f6048049136347d5a5834d88bfc67cc09)

commit c8a48358065ff94b8307d8aedfe58e54f34ba84f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Feb 28 13:07:26 2013 +1000

    Xi: use public.processInputProc to replay the touch history
    
    If a device is frozen in results to a grab, we need to enqueue the events.
    
    This makes things complicated, and hard to follow since touch events are now
    replayed in the history, pushed into EnqueueEvent, then replayed later
    during PlayReleasedEvents in response to an XAllowEvents.
    
    While the device is frozen, no touch events are processed, so if there is a
    touch client with ownership mask _below_ the grab this will delay the
    delivery and potentially screw gesture recognition. However, this is the
    behaviour we have already anyway if the top-most client is a sync pgrab or
    there is a sync grab active on the device when the TouchBegin was generated.
    
    (also note, such a client would only reliably work in case of ReplayPointer
    anyway)
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit a7d989d335f903ffd8b168cd2beeb82c78d30c21)

commit 2fcf86036f95128e9b90ddbd5ffc6edbacd3de9f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Feb 27 15:05:54 2013 +1000

    Xi: when punting to a new owner, always create TouchEnd events
    
    If a touch is pending_finish and we just punted it to the next owner, that
    client must receive a TouchEnd event.
    
    If we just punted to the last owner and that owner not a touch grab, we need
    to end the touch since this is the last event to be sent, and the client
    cannot accept/reject this.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 214d11d3fcdac51fc7afbf3770516ec14f9e13c1)

commit e1c908f3931aa82c7c5f14aa162e02f3abf98faf
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Mar 1 09:15:37 2013 +1000

    Xi: save state for early acceptance
    
    Delivering an event changes the state to LISTENER_IS_OWNER and we thus lose
    the information of early acceptance.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 026627fe19aad007544eccf209f0dea05e67a7a7)

commit 7343d05e3a502216532aa9901c3a8948ea118c78
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Feb 28 15:28:46 2013 +1000

    Xi: if a passive async grab is activated from an emulated touch, accept
    
    Async grabs cannot replay events, they cannot reject, so we can do an early
    accept here.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit d905348134c80f19793eefb761731b00559ddf3a)

commit 18346911ab0ce1ad66986b83f9afefadec25555e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Feb 28 13:04:36 2013 +1000

    Xi: fix lookup in ActivateEarlyAccept
    
    ActivateEarlyAccept() can only be called from a grabbing client, so we can
    ignore the rest. And it's easy enough to get the client from that since
    9ad0fdb135a1c336771aee1f6eab75a6ad874aff.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 8b0d21044956f3810199d5e2f38ce33069e97be7)

commit 000d469dd4d97424c72d82e4383ec295e31ffd34
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Feb 28 13:08:27 2013 +1000

    Xi: update the core listener state if we delivered the touch event
    
    If a TouchBegin is sent to a core client, that client is now the owner.
    
    By the time the TouchEnd is being processed, the client cannot replay
    anymore, so we can assume that this is the final touch end and we can clean
    up the touch record.
    
    Note: DeliverTouchEmulatedEvent is called for all listeners and immediately
    bails out if the client is not the owner and thus shouldn't yet get the
    event. Thus, check the return code.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit d08bae297f9d7651edb1923d6b0d6b14b3d674fc)

commit a7ec834d5e8c351cfa5d87b7902fa061826e3097
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Feb 25 11:21:07 2013 +1000

    Xi: if we delivered a TouchEnd to a passive grab, end it
    
    ef64b5ee97099618cf2e2cbbd3e471095695ae24 (which introduced the
    TOUCH_CLIENT_ID check) has a wrong assumption that generated touch events
    (TOUCH_CLIENT_ID) should not terminate passive grabs.
    This is untrue, a TouchEnd may be generated in response to a TouchReject
    higher up. If we _deliver_ an event to a client, terminate the passive grab.
    
    This requires us to count the actually delivered events too (first hunk).
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 81554d274f04951c55ea7f2e38d0455e2025e08d)

commit 636647bc7f9ed10918cbb228f7d448c8cf733667
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Feb 13 11:26:11 2013 +1000

    dix: don't prepend an activated passive grab to the listeners
    
    If the device is currently grabbed as the result of a passive grab
    activating, do not prepend that grab to the listeners (unlike active grabs).
    Otherwise, a client with a passive pointer grab will prevent touch grabs
    from activating higher up in the window stack.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 363b6387da6e669099a2da3861c73a29808295a6)

commit 87e027726f2d9223ce2fef2e4d26c18ae680a05e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Feb 13 10:49:23 2013 +1000

    Xi: not having an ownership mask does not mean automatic acceptance
    
    If we only have a single touch-grabbing client, setting the client as owner
    would clean up the touch once the TouchEnd was processed. If the client then
    calls XIAllowTouches() it will receive a BadValue for the touch ID (since
    the internal record is already cleaned up).
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 9cc45c18ad1511adf3fb163dd4cefbef106edb23)

commit 34f5ca3a70e966d6fe232179a47c3dc660773ad5
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Mar 1 08:26:06 2013 +1000

    Xi: use a temp variable for the new listener
    
    Instead of accessing ti->listener[0] all the time.
    
    No functional changes.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit fc504a44d12d537d4e07f659f1863f200a0272ad)

commit 54b125d1751385bcfc3c1b51d21ee6a7dc14143b
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Tue Apr 30 14:30:18 2013 -0700

    xfree86: don't enable anything in xf86InitialConfiguration for GPU screens
    
    There's no point in turning on outputs connected to GPU screens during initial
    configuration.  Not only does this cause them to just display black, it also
    confuses clients when these screens are attached to a master screen and RandR
    reports that the outputs are already on.
    
    Also, don't print the warning about no outputs being found on GPU screens,
    since that's expected.
    
    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Dave Airlie <airlied@gmail.com>
    (cherry picked from commit dbfeaf70623a83e1a3f3255c94d52e0e04702837)

commit 29545a422bbdd11fda5cb61f27720332d68d0c36
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed Jan 9 12:52:13 2013 +1000

    gpu: call CreateScreenResources for GPU screens
    
    I didn't think we needed this before, but after doing some more
    work with reverse optimus it seems like it should be called.
    
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit f2fd8ec3725a61abbc831f0a9ec28fa2b7020c47)

commit f21cc327a56e3b453cf0dba04457223d61c27ea6
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed Jan 9 12:52:08 2013 +1000

    dix: allow pixmap dirty helper to be used for non-shared pixmaps
    
    this allows the pixmap dirty helper to be used for reverse optimus,
    where the GPU wants to copy from the shared pixmap to its VRAM copy.
    
    [airlied: slave_dst is wrong name now but pointless ABI churn at this point]
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 8fcb9d91b69abc72ddef31b9f2e8585580c6cad2)

commit d817284b01ad3bbe02c71d6b00af7526be77626b
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed Jan 9 12:52:03 2013 +1000

    xf86crtc: don't use scrn->display for gpu screens
    
    scrn->display is a property of the main screen really, and we don't
    want to have the GPU screens use it for anything when picking modes
    or a front buffer size.
    
    This fixes a bug where when you plugged a display link device, it
    would try and allocate a screen the same size as the current running
    one (3360x1050 in this case), which was too big for the device. Avoid
    doing this and just pick sizes based on whats plugged into this device.
    
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 16077b81c502e04d77f81f683e0c213b9fe75393)

commit 803d0ac49900903915f1dcd2496f085e5c1afa22
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed Jan 9 12:51:55 2013 +1000

    dix/gpu: remove asserts for output/offload from same slave
    
    We should have no problem allowing output/offload from the same slave,
    I asserted here, but in order to implement reverse optimus this makes
    perfect sense. (reverse optimus is intel outputting to nvidia).
    
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit f0d0d75bfe62553dde353f89e46ff13dd863fbe8)

commit 3608d9f3dd6ae1d23e23294e9a56cb8158e65d19
Author: Piotr Dziwinski <piotrdz@gmail.com>
Date:   Sat Feb 23 13:14:45 2013 +0100

    glx: fix uninitialized var in __glXDRIscreenProbe
    
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=59825
    
    Signed-off-by: Piotr Dziwinski <piotrdz@gmail.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit cc3d1a5a6120e721a46c67446ba68f5596055633)

commit 2767d9a17d62aede7cabac589c3388078bdb6022
Author: Matt Dew <marcoz@osource.org>
Date:   Tue Jun 25 09:49:08 2013 -0600

    Bump rev from  1.14.1.902  to 1.14.2

commit 7dec1d38799d82923e3241f73c83aa1ad357f72b
Author: Matt Dew <marcoz@osource.org>
Date:   Fri Jun 21 10:24:16 2013 -0600

    Revert "dix: pre-scale x by the screen:device:resolution ratio"
    
    This reverts commit 14d89b9a466b521b985bc95fc4994637367362a8.

commit 187cb5a037a03ab1e7702da5eebb2e7d884c6186
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Wed Apr 24 15:24:31 2013 -0700

    Only call xf86platformVTProbe() when it's defined
    
    Fixes build on non-udev systems, since XSERVER_PLATFORM_BUS is only
    defined in configure.ac if $CONFIG_UDEV_KMS is true.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>

commit 34259752340e287333fb03f3060c6db13d72f868
Author: Matt Dew <marcoz@osource.org>
Date:   Thu Jun 13 16:25:26 2013 -0600

    Bump rev from 1.14.1.901 to 1.14.1.902

commit 31e066546fd085725cc29e95867a04c70ce46ebc
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Apr 26 15:10:08 2013 +1000

    dix: fix device scaling to use a [min,max[ range.
    
    defmin/defmax are screen coords and thus use a min-inclusive, max-exclusive
    range. device axes ranges are inclusive, so bump the max up by one to get the
    scaling right.
    
    This fixes off-by-one coordinate errors if the coordinate matrix is used to
    bind the device to a fraction of the screen. It introduces an off-by-one
    scaling error in the device coordinate range, but since most devices have a
    higher resolution than the screen (e.g. a Wacom I4 has 5080 dpi) the effect
    of this should be limited.
    
    This error manifests when we have numScreens > 1, as the scaling from
    desktop size back to screen size drops one device unit.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 756ab88d93542f0589c9bf46f40ccc57df64f0fd)

commit 14d89b9a466b521b985bc95fc4994637367362a8
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Sat Mar 9 20:43:51 2013 +1000

    dix: pre-scale x by the screen:device:resolution ratio
    
    commit 61a99aff9d33728a0b67920254d2d4d79f80cf39
        dix: pre-scale relative events from abs devices to desktop ratio (#31636)
    
    added pre-scaling of relative coordinates coming from absolute devices to
    undo uneven scaling based on the screen dimensions.
    
    Devices have their own device width/height ratio as well (in a specific
    resolution) and this must be applied for relative devices as well to avoid
    scaling of the relative events into the device's ratio.
    
    e.g. a Wacom Intuos4 6x9 is in 16:10 format with equal horiz/vert
    resolution (dpi). A movement by 1000/1000 coordinates is a perfect diagonal
    on the tablet and must be reflected as such on the screen.
    
    However, we map the relative device-coordinate events to absolute screen
    coordinates based on the axis ranges. This results in an effective scaling
    of 1000/(1000 * 1.6) and thus an uneven x/y axis movement - the y
    axis is always faster.
    
    So we need to pre-scale not only by the desktop dimenstions but also by the
    device width/height ratio _and_ the resolution ratio.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 5cc2c96f824dbb28b9f8da61efc41596f8bd0561)

commit 57f6dbb3032b934a39c15cd1980b345f477ce1e6
Author: Robert Morell <rmorell@nvidia.com>
Date:   Thu May 9 13:09:02 2013 -0700

    os: Reset input buffer's 'ignoreBytes' field
    
    If a client sends a request larger than maxBigRequestSize, the server is
    supposed to ignore it.
    
    Before commit cf88363d, the server would simply disconnect the client.  After
    that commit, it attempts to gracefully ignore the request by remembering how
    long the client specified the request to be, and ignoring that many bytes.
    However, if a client sends a BigReq header with a large size and disconnects
    before actually sending the rest of the specified request, the server will
    reuse the ConnectionInput buffer without resetting the ignoreBytes field.  This
    makes the server ignore new X clients' requests.
    
    This fixes that behavior by resetting the ignoreBytes field when putting the
    ConnectionInput buffer back on the FreeInputs list.
    
    Signed-off-by: Robert Morell <rmorell@nvidia.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 67c66606c760c263d7a4c2d1bba43ed6225a4e7c)

commit 8cc686735296f1ff32089e64f78dfee46b8e7149
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu May 9 14:30:49 2013 +1000

    dix: don't overwrite proximity/focus classes
    
    InitPointerClassDeviceStruct/InitKeyboardDeviceStruct allocate a
    proximity/focus class, respectively. If a driver calls
    InitFocusClassDeviceStruct or InitProximityClassDeviceStruct beforehand,
    the previously allocated class is overwritten, leaking the memory.
    
    Neither takes a parameter other than the device, so we can simply skip
    initialising it if we already have one.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 8a88b0ab52ba375ae84463a90503db88af10e368)

commit bf115aa906795df872104083c1187c126c3b1d76
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Apr 17 19:47:42 2013 +1000

    dix: plug memory leak in freeing TouchClass
    
    ==15562== 1,800 bytes in 1 blocks are definitely lost in loss record 298 of 330
    ==15562==    at 0x4A06B6F: calloc (vg_replace_malloc.c:593)
    ==15562==    by 0x4312C7: InitTouchClassDeviceStruct (devices.c:1644)
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit 7d722796c678532e8c5897c673c43184da353f44)

commit 6abc41689cfd274f5aa8bdfbfcd4e3dd7d0249fa
Author: Matt Dew <marcoz@osource.org>
Date:   Fri May 31 00:06:34 2013 -0600

    bah,  fixed release version: changed from rc1 to 1.901

commit 27c30396bf7ff16192fe5e17c6fe04ee58ee398b
Author: Matt Dew <marcoz@osource.org>
Date:   Thu May 30 22:34:17 2013 -0600

    bump release info to 1.14.2-rc1 (from 1.14.1)

commit bcc8eba00b57a63255e05bf80bad0cb95a5a5c3e
Author: Andreas Müller <schnitzeltony@googlemail.com>
Date:   Tue Apr 16 14:30:43 2013 +0200

    dixstruct.h: fix segfaults - char is unsigned for ARM and PowerPC architectures
    
    see ARM related bug reports [1-3]
    
    [1] https://github.com/archlinuxarm/PKGBUILDs/issues/446I
    [2] http://www.raspberrypi.org/phpBB3/viewtopic.php?t=38568&p=321673
    [3] http://lists.linuxtogo.org/pipermail/openembedded-core/2013-April/037805.html
    
    Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

commit a01839e8d3675abfef871a42415779961f1ee51c
Merge: 348de79 e90beb1
Author: Matt Dew <marcoz@osource.org>
Date:   Thu May 23 22:08:23 2013 -0600

    Merge branch 'server-1.14-branch' of git://people.freedesktop.org/~whot/xserver into server-1.14-branch

commit 348de79d8c3993577912c7aaf891b7ae702ad32d
Merge: a11cf8d c760fb0
Author: Matt Dew <marcoz@osource.org>
Date:   Thu May 23 14:49:33 2013 -0600

    Merge commit 'c760fb0154848d47438908ba8b3da2fffc68a460' into server-1.14-branch

commit e90beb18000cf49b9108c4f977abfd111ed908ad
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Apr 30 15:44:37 2013 +1000

    os: Use ErrorFSigSafe from FatalError and it's friends
    
    Backtrace logging etc. is already sigsafe, but the actual FatalError message
    in response is not yet, leading to amusing logs like this:
    
        (EE) Segmentation fault at address 0x0
        (EE) BUG: triggered 'if (inSignalContext)'
        (EE) BUG: log.c:499 in LogVMessageVerb()
        (EE) Warning: attempting to log data in a signal unsafe manner while in
        signal context.
        Please update to check inSignalContext and/or use LogMessageVerbSigSafe() or
        ErrorFSigSafe().
        The offending log format message is:
    
        Fatal server error:
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 042c6d861f7bb7038ddcdd6b59766fd9094d0e52)

commit d0725a0b8672465cc4d3b85fb705ddb64d020476
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Feb 14 16:24:53 2013 +1000

    os: complain about unsupported pnprintf directives
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit d9848fb4b182ca21bacf28ed7410d1a502cb000e)

commit 7eb73779a0c82386710c4b670a342c0340485d19
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Feb 14 16:19:34 2013 +1000

    os: support %c in pnprintf
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit d903d17d7f006fa333265b8476063b189c20d082)

commit 6da756fb1d67d6de99077826a3d2434b0e3a1555
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Feb 14 16:13:22 2013 +1000

    os: support %% in pnprintf
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 58ef34ee6d0f68aa28f6f1a26e56f49ec85ed9bf)

commit b606767f20c566e24704502eae682eacb41f450e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Feb 14 15:34:32 2013 +1000

    os: support pnprintf length modifiers for integers
    
