commit 60e0d205666c1fc0c818b9430c1e20428c9d3808
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Jul 9 10:44:01 2012 +1000

    configure.ac: Bump to Version 1.12.3
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

commit 738e55ebbdf516a45b95761b815bed4e697dc726
Author: Torsten Kaiser <just.for.lkml@googlemail.com>
Date:   Fri Jul 6 12:10:25 2012 -0700

    xfree86: EDID Est III parsing skips some modes
    
    This loop needs to count from 7 to 0, not only from 7 to 1.
    The current code always skips the modes {1152, 864, 75, 0}, {1280, 1024, 85, 0},
    {1400, 1050, 75, 0}, {1600, 1200, 70, 0} and {1920, 1200, 60, 0}.
    
    Signed-off-by: Torsten Kaiser <x11@ariolc.dyndns.org>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 7c9d8cbd368cac53e7aed9308292614337db3be2)

commit f27fcb81c4a30cec899628e4bb3e300edbcebe4b
Author: Torsten Kaiser <just.for.lkml@googlemail.com>
Date:   Fri Jul 6 12:06:13 2012 -0700

    xfree86: EDID Est III parsing can walk off end of array
    
    Using -O3 gcc notes that m could reach beyound the end of the EstIIIModes array,
    if the last bits of the 11s byte where set.
    Fix this, by extending the array to cover all possible bits from est.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=45623
    
    Signed-off-by: Torsten Kaiser <x11@ariolc.dyndns.org>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 0b3abacb6430e6593c4358420ba457d8149bd32b)

commit e4497cd002ffb59cb7cf9df69d47ccb62ab55bf4
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Jun 15 10:00:51 2012 +1000

    xfree86: always enable SIGIO on OsVendorInit (#50957)
    
    Drivers call xf86InstallSIGIOHandler() for their fd on DEVICE_ON. That
    function does not actually enable the signal if it was blocked to begin
    with. As a result, if one vt-switches away from the server (SIGIO is
    blocked) and then triggers a server regeneration, the signal remains
    blocked and input devices are dead.
    
    Avoid this by always unblocking SIGIO when we start the server.
    
    X.Org Bug 50957 <http://bugs.freedesktop.org/show_bug.cgi?id=50957>
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 9f1edced9abc066f0ba47672d006fe50fb206371)

commit ac85a6866fa63d1a1972dfa8fdcfe6ad76705648
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jun 26 09:19:33 2012 +1000

    Xi: extend PropagateMask to EMASKSIZE
    
    Number of devices is 2 + MAXDEVICES, with index 0 and 1 reserved for
    XIAll{Master}Devices. At the current size, PropagateMask would be overrun in
    RecalculateDeviceDeliverableEvents().
    
    Found by Coverity.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 12bfb4cf1bebb66d2c2eb76b93c18a2915b865e5)

commit eca5de2f1a08b38cf17188c8b3d02bae7fc14cd5
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Jun 25 14:24:11 2012 +1000

    dix: fix memory leak in TouchEventHistoryReplay
    
    Don't leak if ti->history is NULL.
    
    Found by coverity.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit a9c09f8f8e2a97e4bfe927bc4c7f29b04ee3403a)

commit c4d28c40bfb7e6ccdb921b610f26a3881bc5974a
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Oct 24 10:01:26 2011 +1000

    xfree86: fix use-after-free issue in checkInput
    
    *dev is the condition of the while loop we're in, reset to NULL after
    freeing
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit e3f47be9fbc489e3eb5832445924810b2ff300f7)

commit 487e8e829942fcafe2435576d1e4cf831002aed4
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Jul 2 10:15:14 2012 +1000

    configure.ac: Version bump to 1.12.2.902 (1.12.3 RC2)
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

commit d21b6f0a2d767ca6fbd8f0ec387f83a50a38b486
Author: Andy Ritger <aritger@nvidia.com>
Date:   Thu Jun 14 09:15:37 2012 -0700

    randr: Don't recurse into mieqProcessInputEvents() from RRTellChanged().
    
    Call UpdateCurrentTimeIf(), not UpdateCurrentTime(), from RRTellChanged().
    The latter calls ProcessInputEvents(), which can trigger a recursion
    into mieqProcessInputEvents().  The former omits the call to
    ProcessInputEvents().
    
    Signed-off-by: Andy Ritger <aritger@nvidia.com>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit dae317e7265007b38012244722e3b3a06e904ed5)

commit a6de3eac661ff6f23145cdaa49fc722381a1899e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Jun 7 16:52:20 2012 +1000

    dix: if the scroll valuator reaches INT_MAX, reset to 0
    
    Too much scrolling down may eventually trigger an overflow of the valuator.
    If this happens, reset the valuator to 0 and skip this event for button
    emulation. Clients will have to figure out a way to deal with this, but a
    scroll event from (close to) INT_MAX to 0 is a hint of that it needs to be
    ignored.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
    (cherry picked from commit 54476b5e4461ff523e935961affabcf0de12c556)

commit b0be2d29b2c72c09de9845d2b1983e4c77c2ef17
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Apr 11 09:43:23 2012 +1000

    Xi: fix XITouchClass sourceid assignment
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
    (cherry picked from commit 72cfc1a097dc1e09d2cd9415ef7855a2cef92351)

commit 4af8e22b1a539778388fe509a7f3a25860a7879c
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Jun 6 14:38:49 2012 +1000

    xkb: warn if XKB SlowKeys have been automatically enabled
    
    Slow keys are enabled when the XKB AccessX features are generally enabled
    (ctrls->enabled_ctrls & XkbAccessXKeysMask) and either shift key is held for
    8 seconds. For the unsuspecting user this appears as if the keyboard
    suddenly stops working.
    
    Print a warning to the log, so we can later tell them "told you so".
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
    (cherry picked from commit ff41753b1bee414b16c0f1e8d183776e87c94065)

commit 0cecc4fc0f232bb64b8ef86d74164a676d92284f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue May 29 10:17:50 2012 +0530

    configure.ac: Version bump to 1.12.2.901 (1.12.3 RC1)
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

commit aaf48906279bcf74bcfd0a1de24de099184be022
Author: Julien Cristau <jcristau@debian.org>
Date:   Fri May 11 21:31:49 2012 +0200

    Xi: make stub DeleteInputDeviceRequest call RemoveDevice
    
    DeleteInputDeviceRequest is called from CloseDownDevices on reset, so
    call RemoveDevice to avoid leaking devices in Xvfb/Xnest/Xwin.
    
    Signed-off-by: Julien Cristau <jcristau@debian.org>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit e4153c1d9138ed40de1c615525066a0f5bb599dc)

commit f4a1ecb9280570c473631760885cc2afb5d174b9
Author: Marcin Slusarz <marcin.slusarz@gmail.com>
Date:   Mon May 21 21:39:43 2012 +0200

    xfree86: fix mouse wheel support for DGA clients
    
    xf86-input-evdev (since "smooth scrolling" support was added) can send mouse
    motion and wheel events in one batch, so we need to handle it properly.
    Otherwise mouse wheel events which come with motion events are lost
    and separate mouse wheel events are handled through non-DGA path.
    
    Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 2d4fda4b09e67e47d3e6fc4743fc6e81bfe40f28)

commit 889ce06946b8c1a246130a899e2702a3d7340fd2
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed May 9 11:30:46 2012 +1000

    dix: undo transformation for missing valuators (#49347)
    
    last.valuators contains the transformed valuators of the device. If the
    device submits events with x/y missing, we need to get that from
    last.valuators and undo the transformation to that axis.
    
    X.Org Bug 49347 <http://bugs.freedesktop.org/show_bug.cgi?id=49347>
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
    (cherry picked from commit 749a593e49adccdf1225be28a521412ec85333f4)

commit 4c21adab7ce4290ea038e13dd20a850f50d95f23
Author: Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com>
Date:   Tue May 29 10:17:50 2012 +0530

    xkb: Allocate size_syms correctly when width of a type increases
    
    The current code seems to skip syms with width less than
    type->num_levels when calculating the total size for the new
    size_syms. This leads to less space being allocated than necessary
    during the next phase, which is to copy over the syms to the new
    location. This results in an overflow leading to a crash.
    
    Signed-off-by: Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 42ae2e8199fe875319978249963de7499607988b)

commit 472c2d1af75d8e321728589e377f73116adb29fa
Author: Michal Suchanek <hramrach@gmail.com>
Date:   Wed May 23 11:22:05 2012 +0200

    Fix crash for motion events from devices without valuators
    
    A WarpPointer request may trigger a motion event on a device without
    valuators. That request is ignored by GetPointerEvents but during smooth
    scroll emulation we dereference dev->valuators to get the number of axes.
    
    Break out early if the device doesn't have valuators.
    
    Signed-off-by: Michal Suchanek <hramrach@gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 88c767edb01ed7efb19ffe3a453e16107b27130b)

commit 97cae5e07a8e81c17cf18df7843db6ab1fc6a2a7
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Jan 26 15:44:40 2012 -0800

    Convert sbusPaletteKey to latest DevPrivate API
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 96e0ab54962ab59f03275a098ee02c1f0f86b94e)

commit 3484ef2de50970fefe0c2580f52357ee37d3e6f3
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Apr 6 21:51:37 2012 -0700

    cvt man page should use Hz, not kHz, for vertical refresh rate
    
    https://bugs.freedesktop.org/show_bug.cgi?id=48311
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    (cherry picked from commit c3180a74a4fc6304bcfe676e3285d707874a9fea)

commit a5808eae02749507c49978f71d5aba2f3193cb07
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Apr 27 13:35:32 2012 -0700

    Undocument Font Module loading
    
    Code was deleted in commit affec10635343668839994ea2bac16c1d4524200
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit 5a3a98fcb799c2ac8fa7494645ad9030f1cac837)

commit 9a4e2d80a5e79f6818879d682bb21a47acefc550
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Apr 27 13:31:56 2012 -0700

    Undocument mandatory loadable modules
    
    The code to implement was deleted when BaseModules[] was emptied by
    the replacement of the "pcidata" module with libpciaccess calls
    in commit 46f55f5dead5d70cdff30531d80a72f6be042315.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit afcb7ba24ebd9968d48a192df438e7f1c0ecb770)

commit 19126c0b36843f7c0e81631d1a1228d18e39eb62
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Thu May 17 10:08:02 2012 -0700

    XQuartz: Avoid a race in initialization of darwinPointer
    
    http://xquartz.macosforge.org/trac/ticket/579
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit acdc4f54ee5784d26c251ff8c941b4360ae80e9b)

commit 198a876e34b880be5f7da683ec3ff21a53edcec5
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Mon May 7 17:07:27 2012 -0700

    XQuartz: Provide fls implementation for Tiger
    
    Regression-from: 30623d6ff7bca223f9e1a825e86bd317eef8bf16
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit f5fc5334116ad2b0c8930ac68c52bf0f7a2f1417)

commit 300970f8f80ef15614fef78215476a8011895000
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Mon May 7 16:31:38 2012 -0700

    XQuartz: Tiger build fix
    
    http://trac.macports.org/ticket/34364
    
    Regression-from: 662d41acdde1dcb9774fbe4054e251c708acaffe
    
    Reported-by: Peter Dyballa <Peter_Dyballa@Freenet.DE>
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit e0097ce9719f9b0aeccf7102630c0299f8acdf93)

commit 21956e2f8e506dd167f188be0d3b18e052c6913d
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Mon May 7 16:16:20 2012 -0700

    XQuartz: Workaround an SDK bug on Leopard/x86_64
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit 4acbaa3027d89728ed932616f6ef66d93537b101)

commit 131fe8fbd17edb05084cd7cddc3c4d3d3b393d73
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Tue May 29 13:05:02 2012 -0700

    configure.ac: Version bump to 1.12.2
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

commit 4a2b8eebd1e93a8a0d003e9f5a594430eff08dad
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Sat May 19 22:11:19 2012 -0700

    configure.ac: Version bump to 1.12.1.902 (1.12.2 RC2)
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

commit 32235e978685d3ebe9c418fecfe3ec584c402008
Merge: 58dfb13 dab90b6
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Thu May 17 09:56:29 2012 -0700

    Merge remote-tracking branch 'whot/server-1.12-branch' into server-1.12-branch

commit dab90b60f3b2ebfd8df4fa761f3f34859250f4db
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Tue May 1 10:21:12 2012 -0700

    Report touch emulated buttons in XIQueryPointer for XI 2.1 and earlier
    
    XInput 2.1 and earlier clients do not know about touches. We must report
    touch emulated button presses for these clients. For later clients, we
    only report true pointer button presses.
    
    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 ee542b85590814ee25369babce1ad14feeb137af)

commit 04474fc6a4c21a06c1a65c7afcbc4e0a27e3d0f7
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Tue May 1 10:21:11 2012 -0700

    Report logical button state in ProcXIQueryPointer
    
    Physical button state is usually meaningless to an X client.
    
    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>
    (cherry picked from commit 1e7b500a8e1d79b91a4e857a2da06194efe8cf69)

commit 3b25ed442ca9152841fa821ac3b01c2c9cb4e0d1
Author: Daniel Kurtz <djkurtz@chromium.org>
Date:   Wed Apr 18 17:51:53 2012 +0800

    os/log: refactor logging
    
    It is not safe to ever use an arbitrary (possibly user supplied) string as
    part of the format for a *sprintf() call.
    
    For example:
      1. Name a Bluetooth keyboard "%n%n%n%n%n%n%n%n"
      2. Pair it with a computer running X and try to use it
      3. X is not happy when trying to do the following in xf86-input-evdev:
         xf86IDrvMsg(pInfo, X_CONFIG, "Device: \"%s\"\n", device);
         because LogVHdrMessageVerb() has put the %n from the device name
         into a format string of the form:
            "evdev: %n%n%n%n%n%n%n%n: Device: \"%s\"\n"
    
    Instead, build up a log message in place by appending successive formatted
    strings by sncprintf'ing to the end of the previous.
    
    Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit c91d00e0f330b9de604068e1bfcb0a307096434f)

commit 34a82b393a037788fbebbc423bfdcdd6f94f3577
Author: Daniel Kurtz <djkurtz@chromium.org>
Date:   Wed Apr 18 17:51:52 2012 +0800

    os/log: only write timestamp if a message is actually written to logfile
    
    The current code will write a timestamps into the logFile whenever
    the last message ended with a '\n' - even if the verb for that timestamp
    is at too high a level.  This timestamp will sit there with no matching
    message until the next call to LogVWrite with a valid verb.
    
    In other words, in some cases, timestamps in the X.org.log are for some
    completely unrelated message that was previously ignored due to
    insufficient verbosity, and not for the message that appears next to it
    in the log file.
    
    We keep the current policy which appears to be to only apply timestamps if
    a message is actually written to a log file.  That is, no timestamps on
    stderr, or in the mem buffer.  Therefore, the timestamp stringification
    is moved to the conditional where it is used.
    
    Since logging uses a fixed length buffer, this patch also forces a '\n'
    whenever a buffer is terminated due to a too-long write request.  This
    allows the newline detection to work even on overflow, and also cleans up
    the log a bit in the overflow case.
    
    Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 6ce0eac4f8a05f6d7401445cab95027709d3a479)

commit 8998037f183fd1f73fe0d272b4e072e53c7f3bcc
Author: Daniel Kurtz <djkurtz@chromium.org>
Date:   Wed Apr 18 09:51:51 2012 +0000

    os/xprintf: add Xvscnprintf and Xscnprintf
    
    Normal snprintf() usually returns the number of bytes that would have been
    written into a buffer had the buffer been long enough.
    
    The scnprintf() variants return the actual number of bytes written,
    excluding the trailing '\0'.
    
    Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 5c2e2a164d615ab06be28a663734e782614b5cc7)

commit 9a2030ea26a2a0821d87afea502f5446ae002a6d
Author: Daniel Kurtz <djkurtz@chromium.org>
Date:   Wed Apr 18 17:51:50 2012 +0800

    os/log: trivial cleanups
    
     * space->tab
     * remove comment that doesn't make any sense
    
    Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit c30862879d2c766519780bb7f353f35edf0daa9b)

commit 58dfb13953af71021317b9d85230b1163198f031
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Thu May 10 00:53:20 2012 -0700

    Revert "dix: when disabling a device, release all buttons and keys"
    
    This reverts commit 90299556db24543bb7365e8c2897deca3aa219e7.
    
    The commit being reverted triggered a segfault on server shutdown when a
    device posts raw events after the root windows are forced to NULL.
    
    https://lists.debian.org/debian-x/2012/05/msg00240.html
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

commit f012f0c48dedba4df69cc1a1ecdf8ee5d37daca9
Author: Michal Suchanek <hramrach@gmail.com>
Date:   Thu Apr 26 15:11:20 2012 +0200

    dmx: Annotate dmxlog.c with _X_ATTRIBUTE_PRINTF and _X_NORETURN
    
    and fix resulting printf warning in dmxLogVisual
    
    Signed-off-by: Michal Suchanek <hramrach@gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit d662fa2450856777b59c4b62b912395a8bfd52fd)

commit f8d2ca759ad37d5e99d462f21a2259ce17bb1a00
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Apr 18 15:56:37 2012 +1000

    dix: indentation fix
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit ebf214876a4885a98ded4f5525925b69005fae05)

commit 15607cf2dc87405606b20113011f1ebd97637d32
Author: Daniel Kurtz <djkurtz@chromium.org>
Date:   Thu Apr 12 10:11:10 2012 +1000

    dix: don't BUG_WARN for button events from button-only device
    
    Events from button-only devices still need coordinates, and they get them
    from scale_to_desktop().  Therefore, a dev without valuators is not a bug.
    However, a dev with valuators, but less than two of them still is a bug.
    
    This was noticed when unplugging a "Creative Technology SB Arena Headset",
    which has some BTNs and some KEYs, but no REL or ABS valuators.
    It emits [BTN_3] = 0 on unplug, which would trigger the BUG_WARN.
    
    Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit c5a45b0f7658c77725adce2b64a0fbd62f208328)

commit 3ad72a80088fe3236f38bd0696b04f399e24fe3d
Author: Keith Packard <keithp@keithp.com>
Date:   Wed Apr 11 09:33:54 2012 -0700

    hw/xfree86: Re-indent xf86vmode.c
    
    This is the result of re-running the 'x-indent.sh' script over
    xf86vmode.c to clean up the disaster caused by broken syntax in the
    file.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 9779b904c7c0b49c74054c22c420012c40595cdc)

commit b5bf0ac5405eab77f26bb2f8726644232af17178
Author: Keith Packard <keithp@keithp.com>
Date:   Wed Apr 11 09:28:21 2012 -0700

    hw/xfree86: Spurious ');' in xf86vmode.c messed up indentation badly
    
    Inside the unfinished XF86VIDMODE_EVENTS #ifdef block the
    function definition for xf86VidModeNotifyEvent had an extra ');'
    before the prototype argument declarations. This was harmless for the
    compiler as the code never gets used, but completely messed up the
    file re-indentation. This patch removes the spurious characters in
    preparation for re-indenting the file.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 592bd0ae2b60cd6f6afd3efc40f5f659b12900b4)

commit 943cac51e4cb79dcbd143d4bd6b22ca9327e7703
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Mon May 7 00:03:01 2012 -0700

    configure.ac: Bump to 1.12.1.901 (1.12.2 RC1)
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

commit 22a1953c4a2747d637bb926034f11134809b8d06
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Thu Apr 26 21:17:54 2012 -0700

    XQuartz: Make sure we tell startx the correct server binary to use in our fallback path
    
    With multiple servers installed, we can't be certain if X is Xorg or Xquartz
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit 93d6ba5b711cbd3f502d83e54c9739856d2e6f2a)

commit 90299556db24543bb7365e8c2897deca3aa219e7
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Apr 30 10:01:48 2012 +1000

    dix: when disabling a device, release all buttons and keys
    
    A suspend-induced device disable may happen before the device gets to see
    the button release event. On resume, the server's internal state still has
    some buttons pressed, causing inconsistent behaviour.
    
    Force the release and the matching events to be sent to the client.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
    (cherry picked from commit f3410b97cf9b48a47bee3d15d232f8a88e75f4ef)
    
    Conflicts:
    
    	dix/devices.c

commit b53cdf4c53f0787ed41281278877e0405fcb2674
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Apr 27 16:31:17 2012 +1000

    dix: don't emulate scroll events for non-existing axes (#47281)
    
    Test case:
    - create a device with REL_HWHEEL and ABS_X and ABS_Y. evdev 2.7.0 will set
      that up as device with 1 relative axis
    - move pointer to VGA1
    - xrandr --output VGA1 --off
    
    Warps the pointer to the new spot and calls GPE with the x/y mask bits set.
    When running through the loop to check for scroll event, this overruns the
    axes and may try to emulate scroll events based on random garbage in the
    memory. If that memory contained non-zero for the scroll type but near-zero
    for the increment field, the server would hang in an infinite loop.
    
    This was the trigger for this suggested, never-merged, patch here:
    http://patchwork.freedesktop.org/patch/9543/
    
    X.Org Bug 47281 <http://bugs.freedesktop.org/show_bug.cgi?id=47281>
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
    (cherry picked from commit af88b43f9e604157b74270d609c08bdfa256a792)

commit 9ddf9e2388f9ac5f4c325304ab0c59c1fd5e2024
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Apr 27 10:52:39 2012 +1000

    os: make timers signal-safe
    
    If TimerSet() is called from a signal handler (synaptics tap handling code)
    may result in list corruption if we're currently inside TimerSet().
    
    See backtrace in
    https://bugzilla.redhat.com/show_bug.cgi?id=814869
    
    Block signals for all list manipulations in the timers.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
    (cherry picked from commit 08962951de969b9d8c870af8b6e47303dc0decfd)

commit 345761be71b86b687f407eb8de746a33bab7ad2e
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Fri Apr 20 11:08:15 2012 -0700

    TouchListenerAcceptReject: Warn and return early on bad listener index
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Reviewed-by: Bryce Harrington <bryce@canonical.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 5c361d59c5031d9b3f7f9093a52d2b1ff4d9ae5f)

commit ed33772a0d3ace5844e157ae78885ded000819ea
Author: Michal Suchanek <hramrach@gmail.com>
Date:   Wed Mar 28 18:12:39 2012 -0700

    xfree86: workaround crash on close
    
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=41653
    
    Signed-off-by: Michal Suchanek <hramrach@gmail.com>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    Tested-by: Knut Petersen <Knut_Petersen@t-online.de>
    (cherry picked from commit fa6dddc6ce51c1b7a43fb379fb2a19550f6c8683)

commit e4dbdee392c78de13fab03c3826f9453f42a8a46
Author: Jonas Maebe <jonas.maebe@elis.ugent.be>
Date:   Sun Apr 22 20:52:47 2012 -0700

    glapi: Correct size of allocated _glapi_table struct
    
    The __glapi_gentable_set_remaining_noop() routine treats the _glapi_struct
    as an array of _glapi_get_dispatch_table_size() pointers, so we have to
    allocate _glapi_get_dispatch_table_size()*sizeof(void*) bytes rather than
    sizeof(struct _glapi_struct) bytes.
    
    Signed-off-by: Jonas Maebe <jonas.maebe@elis.ugent.be>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit adcb48a29dcb3f32ff570551de4b014775c1e147)

commit 6b45dff0240729a78a43cc74f1631b2dd5a0d6b3
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Thu Apr 19 16:38:06 2012 -0700

    XQuartz: darwinPointer now sends both absolute and relative motion
    
    This should hopefully help out wine clients that were continuing to
    have issues after the earlier changes.
    
    http://xquartz.macosforge.org/trac/ticket/548
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit e34519e525559b01a63d26639f13f0487468de28)

commit 0d13e62da2b3527db7b3b6de91464015eb20a514
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Thu Apr 19 18:48:22 2012 -0700

    XQuartz: Add a hack to better handle clicky wheel scroll mice
    
    We loose information from AppKit being in our way.  Before adopting
    smooth scrolling, we always rounded-up the number of scroll button
    clicks per NSEvent.  Now, the scroll value is accumulated in the
    dix, and clicky scroll wheels with legacy X11 clients are seeing
    an accumulation of error due to so many translations (button press
    to smooth scrolling value in AppKit, passed to the dix, and then
    synthesized into a button press).  This attempts to make the
    situation better.
    
    http://xquartz.macosforge.org/trac/ticket/562
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit 662d41acdde1dcb9774fbe4054e251c708acaffe)

commit 287f8271a3af18fb1a56a761fa02ec76148d9e32
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Thu Apr 19 16:20:30 2012 -0700

    XQuartz: Use screenInfo.{width,height} instead of grabbing it from the first screen
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit eda85290ae47d8dd497ef9335d10268bbe3e02a0)

commit 67cc65ba3ca35b4eb9592e1e6f299938509cddec
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Wed Apr 18 17:50:55 2012 -0700

    XQuartz: Separate out tablet and mouse event delivery into separate functions
    
    This should have no immediate impact aside from fake mouse buttons no longer
    working with tablets (where they aren't needed or desired anyways).  This
    prepares us for future changes.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit b99586c9086ac29df144ef75df92f8c0c7554651)

commit 72226dc434a5d1c4ec391390fe5f2a2c34287fb3
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Thu Apr 19 16:06:45 2012 -0700

    XQuartz: Correct calculation of the size of our file descriptor array in console_redirect
    
    Reported-by: Joe Rohde <joer@valvesoftware.com>
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit 30623d6ff7bca223f9e1a825e86bd317eef8bf16)

commit 8a48d44574375ba4fa85c5a59678998811ea4e80
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Wed Apr 18 01:01:44 2012 -0700

    XQuartz: Fix a deadlock in pre-dispatch code
    
    The fact that this has been in place so long makes me really wonder if
    anybody cares about this running in Tiger or Leopard.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit b4c4c65a35640e7274ccd4228f62110147878b72)

commit 9ef48c9ffff6704dbe7c976d86527f22b0e1d114
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Wed Apr 18 18:21:54 2012 -0700

    Replay original touch begin event instead of generated begin event
    
    The generated event does not have axes other than X and Y and has a
    newer timestamp. In particular, the newer timestamp may be newer than
    the real touch end event, which may be stuck in the syncEvents queue. If
    a client uses the timestamps for grabbing bad things may happen.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 00cf1c40b28417d7035c2917d048553eb720023c)

commit 73cd880fe05c941391a8604406e9ecf657a77f02
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Wed Apr 18 11:15:40 2012 -0700

    Update currentTime in dispatch loop
    
    A request, like input device grabs, may check a request timestamp
    against currentTime. It is possible for currentTime to lag a previously
    sent event timestamp. If the client makes a request based on such an
    event timestamp, the request may fail the validity check against
    currentTime unless we always update the time before processing the
    request.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 312910b4e34215aaa50fc0c6092684d5878dc32f)

commit 96d8df5bc9d400d55830b23afe5525b222f8dfc7
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Tue Apr 17 11:40:15 2012 -0700

    Update device state including when touch record does not exist
    
    If a touch is physically active, the pointer core state should reflect
    that the first button is pressed. Currently, this only occurs when there
    are active listeners of the touch sequence. By moving the device state
    updating to the beginning of touch processing we ensure it is updated
    according to the processed physical state no matter what.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit a986f2f30cbe2a00e72ded7315c4951d7703e549)

commit a9dbdb49698a15ba9bdf4172a6e2fef6133244f3
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Wed Apr 18 12:04:58 2012 -0700

    Check other clients' core masks properly when adding touch listener
    
    The current code checks the core event mask as though it were an XI
    mask. This change fixes the checks so the proper client and event masks
    are used.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit ec9c4295830c3de610e65aca17f4da4a7af3c4c5)

commit 04431dd5e60dc91b61767157914b874515a18feb
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Tue Apr 17 11:39:10 2012 -0700

    Ensure touch is ended when last listener is rejected
    
    Currently, the touch is only logically ended if the touch has physically
    ended. If the touch hasn't physically ended, the touch record is never
    ended. If there aren't any more listeners, we don't need to keep the dix
    touch record around any more.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit e175971a6f44d94aa8306dc6b9228ccb2c8a0b4d)

commit 8ce9616a2ccd3f80bf56d69cb9e3fad89996fffb
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Tue Apr 17 10:49:14 2012 -0700

    Create a new dix touch record for an emulated touch with no listeners
    
    As a special case, if a still physically active pointer emulated touch
    has no listeners and the device is explicitly grabbed for pointer
    events, create a new dix touch record for the grab only.
    
    This allows for clients to "hand off" grabs. For example, when dragging
    a window under compiz the window decorator sees the button press and
    then ungrabs the implicit grab. It then tells compiz to grab the device,
    and compiz then moves the window with the pointer motion. This is racy,
    but is allowed by the input protocol for pointer events when there are
    no other clients with a grab on the device.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit d0449851d1233543c3133d77e0ab7233319cdf5f)

commit da9cedb1e5e50acc7d3dc40398e1a460b7e3cfdc
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Tue Apr 17 13:56:08 2012 -0700

    Rename TouchEnsureSprite to TouchBuildSprite and event type checks
    
    The function will be used for building a sprite for pointer emulation
    after an explicit device grab. This commit refactors the code so that
    TouchBuildSprite will function with any event type and moves the checks
    to the caller.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 3d06bfe93d33cfe6150d8fb0058ee7bc8d80622b)

commit 7be71cb0894052943f94638ffa405cf8dd61bc4a
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Tue Apr 17 08:39:38 2012 -0700

    When activating an explicit grab, update owning listener
    
    Pointer passive grabs may be changed by the grabbing client. This allows
    for a selecting client to change an implicit grab to an active grab,
    which is the mechanism used for pop-up windows like application menus.
    
    We need to do the same thing with touches. If the grabbing client is the
    owner of a touch sequence, change the listener record to reflect the new
    grab. If the grabbing client is not the owner, nothing changes for the
    touch.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 2efbed23c29020f9994ab7c3155ce7386950dc7a)

commit 8ccc6ad63733c7de6bd64b1b11169836d941455b
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Mon Apr 16 15:53:51 2012 -0700

    Don't deactivate implicit pointer grab on fake touch end event
    
    Fake touch end events are generated by touch acceptance and rejection.
    These should not cause implicit pointer grabs to be deactivated.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit ef64b5ee97099618cf2e2cbbd3e471095695ae24)

commit ea3afab228f44d9a41905daeda4c0f9236dbf8e6
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Mon Apr 16 15:31:47 2012 -0700

    End a pointer emulated touch event only on a "real" end event
    
    Fake end events are generated by touch acceptance or rejection. These
    should not end the touch point.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit fc518cd9f59060cc19bb90361767c0f47f0e25eb)

commit fac2c4a5dc1d19bb347729eee8b1bbfc981b853a
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Mon Apr 16 14:19:59 2012 -0700

    On touch accept, only process end event for owner if it has seen the end
    
    We still need to generate the touch ownership event to process the
    ending of the touch event in the case where the owner has the end
    already.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 80d7d1ec6a9d61aa96e7d019dc1bee29d90cea34)

commit aaf0063bde791659009eb9001485ac8c15745ae8
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Wed Apr 11 11:14:51 2012 -0700

    Fix copy/paste error from before git history in UpdateCurrentTimeIf()
    
    See UpdateCurrentTime() for reference. I don't know what bug this might
    trigger, but it wouldn't hurt to fix this.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 8dfd98245d2c44a1eb4c8b7c275e6cfc10fe40f1)

commit acb74b9b36b55d4f80d85fd6a2790b7c72e197a5
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Wed Apr 11 08:17:25 2012 -0700

    When deactivating an explicit pointer grab, reject all grabs on touches
    
    Explicit pointer grabs are placed at the head of the touch listener
    array for pointer emulated touches. If the grab is deactivated, we must
    remove it from all touches for the device.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 6ca30cb33e829b4edd01822367e44ffe6f0951b0)

commit 0dea2b1c935ed4c80621e7f5d6fa5193ae09187a
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Wed Apr 11 08:13:17 2012 -0700

    Accept touch sequence for pointer listener after second event delivery
    
    This is a bit of unimplemented code for touchscreen pointer emulation. A
    pointer grabbing client currently never accepts the touch sequence. The
    sequence must be accepted once any touch-derived event is irrevocably
    delivered to a client.
    
    The first pointer event, derived from a touch begin event, may be caught
    in a sync grab and then replayed. This is essentially a revocable
    delivery of an event. Thus, we must wait till a non-begin event is
    delivered.
    
    Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit cacdb9a74065ccba7d50a82e14abdf04b36c5309)

commit 2bb2eeb05c973ba410773e380e49c2503a2fe9e6
Author: Chase Douglas <chase.douglas@canonical.com>
Date:   Wed Apr 11 08:12:08 2012 -0700

