commit e597f0119cd69b6d9edf86d06d941468f90d8e6d
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Jan 27 21:07:17 2012 -0800

    configure.ac: 1.11.4
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

commit 6c491463ee7a3637c8aae7ddae9625b36b792078
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Jan 20 23:54:58 2012 -0800

    1.11.3.902 (1.11.4 RC2)
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

commit b747a91485184649c05aba6fa10734f70e926032
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Wed Jan 18 11:47:21 2012 -0800

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

commit a1ed67fa0551ee2b39d002d3b786a2017b37c7ac
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Jan 6 13:20:45 2012 +1000

    render: don't bother with animated cursors on floating slaves (#39989)
    
    X.Org Bug 39989 <http://bugs.freedesktop.org/show_bug.cgi?id=39989>
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit bbb6b8c834e0e1491ca14403b5d0840dd14380d3)

commit f89c39e6c9e20ffc3c1ae228ee601c2ab9007ff4
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Jan 9 15:04:10 2012 +1000

    dix: Update pointer limits for floating devices too (#43635)
    
    When the screen is restructured, the pointer limits need to be reset for
    floating slave devices as well, not just for master pointers. Only skip
    devices that don't have a cursor (attached slaves and keyboard)
    
    Bug reproducer: float an absolute slave device, rotate the screen - the
    device is now confined to a section of the screen only.
    
    X.Org Bug 43635 <http://bugs.freedesktop.org/show_bug.cgi?id=43635>
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
    (cherry picked from commit 35bd77e9d0701daae87d681900d749604fc6471f)

commit dea9377a257a402b2c7fe4a96c958d951a7d4579
Author: Zhigang Gong <zhigang.gong@linux.intel.com>
Date:   Wed Jan 4 07:01:19 2012 +0000

    mi/mibitblt: Fix an overflow bug of bit shift.
    
    When depth equal to 32 and planeMask equal to 0, the overflow will
    occur and cause the pixmap can't be cleared. There are some test
    cases in XTS hit this bug, and this fix can eliminate the corresponding
    failures.
    
    Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit f4956faab9ccf9aba6cf9603f4489f5dad19a347)

commit d2db5100b1bafeeea8c1febd390631c8f8abb094
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Oct 28 21:29:50 2011 -0700

    Convert DetermineClientCmd to use strdup instead of malloc+strncpy
    
    *cmdname is initialized to NULL earlier in the function, so it's
    okay to overwrite it with NULL if strdup fails, don't need that
    extra check.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit 780133f9ae7fada462714b47e79d26075bbd9abe)

commit 5b28bcb340e279e7f4e76617e86b439092367690
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Dec 13 21:23:12 2011 -0500

    dix: Tune dixLookupDrawable for success
    
    The vast vast vast majority of resource lookups are successful.  Move some
    work to the error paths so we don't punish success.
    
    Before:
    40000000 trep @   0.0009 msec (1109091.3/sec): PutImage 10x10 square
    60000000 trep @   0.0005 msec (2072652.2/sec): ShmPutImage 10x10 square
    
    After:
    40000000 trep @   0.0009 msec (1148346.9/sec): PutImage 10x10 square
    60000000 trep @   0.0005 msec (2091666.1/sec): ShmPutImage 10x10 square
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit 8f9bdfd293ad8e45755efe8d764b4dcc2a724f51)

commit e1ea93fec93b13d18df4451210aaaf322b769b6a
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Dec 13 20:23:40 2011 -0500

    dix: Tune dtrace hooks around Dispatch
    
    Don't call LookupMajorName if the hooks aren't active, it's quite expensive.
    
    Before:
    40000000 trep @   0.0009 msec (1087458.5/sec): PutImage 10x10 square
    60000000 trep @   0.0005 msec (2012238.6/sec): ShmPutImage 10x10 square
    
    After:
    40000000 trep @   0.0009 msec (1109091.3/sec): PutImage 10x10 square
    60000000 trep @   0.0005 msec (2072652.2/sec): ShmPutImage 10x10 square
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit 83a98543b58c661a22574a6f8d8f9d777c0955b8)

commit 9eaa0b5c89f645c50ea90e07e8b49ebacf4349a0
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Dec 13 21:00:05 2011 -0500

    xace: ricer tuning for XaceHook
    
    gcc doesn't want to hoist the check for XaceHooks[hook] != NULL above the
    varargs code for some reason, so do it ourselves.
    
    Before:
    40000000 trep @   0.0010 msec (1050420.2/sec): PutImage 10x10 square
    60000000 trep @   0.0005 msec (1921147.6/sec): ShmPutImage 10x10 square
    
    After:
    40000000 trep @   0.0009 msec (1087458.5/sec): PutImage 10x10 square
    60000000 trep @   0.0005 msec (2012238.6/sec): ShmPutImage 10x10 square
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit 11977fab546da35d579ebe285e3c26864007805e)

commit a3b6ecc893e17028cfbe16d8d7981c9037fc0766
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jan 3 10:45:45 2012 +1000

    xfree86: split warning about missing identifier or input driver
    
    Check for identifier first and bail if it's missing (also remove the current
    identifier check after we've already bailed due to missing identifiers)
    
    If a driver is missing, warn but also say that we may have added this device
    already. I see too many bugreports with incorrectly shortened log files.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Cyril Brulebois <kibi@debian.org>
    (cherry picked from commit 75953ccb9e9e5f1dbbaa44c714716a0049e22aae)

commit 4a339afc586d55a9a248b893f007219d79c72600
Author: Julien Cristau <jcristau@debian.org>
Date:   Fri Dec 30 20:41:25 2011 +0100

    os: don't ignore failure from dladdr
    
    If dladdr returns 0, don't go and use the returned Dl_info, it may
    contain garbage.
    
    X.Org bug#44315 <https://bugs.freedesktop.org/show_bug.cgi?id=44315>
    
    Reported-and-tested-by: Cyril Brulebois <kibi@debian.org>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    Reviewed-by: Cyril Brulebois <kibi@debian.org>
    Signed-off-by: Julien Cristau <jcristau@debian.org>
    (cherry picked from commit 6269977c91071e0ea16ca5b4b8e15fd6db0b6fcf)

commit 9a4be7e99f0e832df87b8e7fb548793dd4b52717
Author: Matthieu Herrb <matthieu.herrb@laas.fr>
Date:   Mon Jan 2 13:23:59 2012 +0000

    Add OpenBSD support to DetermineClientCmd()
    
    Uses kvm_getargv() from libkvm.
    
    Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 6d6d4cb6043905d850834946e9bfc526ed5a9ef7)

commit 8046717d720c1bbbf02ba986622bc96c6b52a36c
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Dec 24 10:00:56 2011 -0800

    Add Solaris support to DetermineClientCmd
    
    Uses /proc/pid/psinfo to read command & partial arguments.
    
    Moves cmdsize & argsize variables into non-Solaris #else clause
    to avoid unused variable warnings.
    
    Fixes format mismatch errors when building with DEBUG defined on
    a 64-bit platform (where Mask is defined as CARD32).
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit cfc4c3d7fa8bd4da4c08b2ab8e6f85435f75353a)

commit cea9f9f273cb525cb5daa2d2819d3f635582cb24
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Jan 6 22:01:03 2012 -0800

    configure.ac: 1.11.3.901 (1.11.4 RC1)
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

commit b15be8547d4d204f3e498f52d86713a76766e871
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Jan 6 22:12:14 2012 -0800

    Xi: Fix mishandled git merge
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

commit 82e0ae042379181eb143431e1413084432a17079
Merge: f9b00c2 4e4bb31
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Mon Jan 2 20:58:22 2012 -0500

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

commit 4e4bb319a4f9510277557f65676948cd1db10e93
Author: Carlos Garnacho <carlosg@gnome.org>
Date:   Tue Dec 13 15:41:23 2011 +0100

    Xi: assign correct grab_mode/other_device_mode in XI2 passive grabs
    
    CreateGrab() expects the keyboard mode to be stored in grab_mode, and the
    pointer mode in other_device_mode, so respect this in passive XI2 grabs,
    and switch modes if needed.
    
    Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
    (cherry picked from commit 5b169cb695bd450d7f64e3800f00c9237ee67f96)

commit 8c73f6bcbdc04380cc41d9f6dc7e849c7c4f9298
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Dec 8 21:52:07 2011 -0800

    Change disable_clientpointer return type to void
    
    It doesn't return anything, nor does it's caller expect it to.
    
    Fixes Solaris Studio compiler error:
    "xichangehierarchy.c", line 214: Function has no return statement : disable_clientpointer
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 372a6f10dc2d74d2d179e8b92449e9b8636a99ef)

commit ae4272a5742119b10074a542d0dcd4c493cb83e4
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Nov 30 09:06:06 2011 +1000

    xfixes: don't dereference a NULL cursor
    
    If the new cursor is the NULL cursor, don't dereference it and use zeros
    instead.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit 1ab50be938524dcd4a9e56d27e3b96a27c2db2c0)

commit 20efd3c15829d8fbb3610d5af41b67a627e63d21
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Nov 29 16:15:37 2011 +1000

    Xi: when removing a device, reset ClientPointers where needed
    
    if a client had the to-be-removed device as ClientPointer, reset to NULL.
    
    Fixes #43165
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit d2ebbcdaf6b13d70eee704b1764ff349e1be22a0)

commit cf296f2eeffe4b438e9378268f84a1f63c555e52
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Nov 9 15:31:10 2011 +1000

    Xext: don't swap CARD8 in SProcSELinuxQueryVersion
    
    xselinux_ext.c: In function 'SELinuxSendItemsToClient':
    xselinux_ext.c:340:16: warning: unused variable 'n' [-Wunused-variable]
    xselinux_ext.c: In function 'SProcSELinuxQueryVersion':
    xselinux_ext.c:532:62: error: call to 'wrong_size' declared with attribute
    error: wrong sized variable passed to swap
    xselinux_ext.c:533:62: error: call to 'wrong_size' declared with attribute
    error: wrong sized variable passed to swap
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    (cherry picked from commit bb4aa1f263ad38c175bfda3b7e6c325260ce3f28)
    
    Conflicts:
    
    	Xext/xselinux_ext.c

commit 4b386610243b1a30db7e4cdb89cb43012198407d
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Dec 16 12:41:08 2011 +1000

    dix: button state must show the logical buttons, not physical buttons
    
    If the device is mapped 3 2 1, a click on physical button 1 sends a button 3
    press, but the state was set for button 1. Fix this, the state must be set
    for that button's logical mapping.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=655928
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 9567d21e85b99febe805263a4d93b15fd1f7ab42)
    
    Conflicts:
    
    	dix/inpututils.c

commit f9b00c2aba496fe470c24d0f8d3e3d0e3b05aa65
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Nov 29 16:15:37 2011 +1000

    Xi: when removing a device, reset ClientPointers where needed
    
    if a client had the to-be-removed device as ClientPointer, reset to NULL.
    
    Fixes #43165
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit d2ebbcdaf6b13d70eee704b1764ff349e1be22a0)

commit e4984b3023351b5fcc506f4a196ad699db8b0535
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Nov 30 09:06:06 2011 +1000

    xfixes: don't dereference a NULL cursor
    
    If the new cursor is the NULL cursor, don't dereference it and use zeros
    instead.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit 1ab50be938524dcd4a9e56d27e3b96a27c2db2c0)

commit 625d1088192a9ad972c20fbdbcb4bb9fda979157
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Dec 16 09:15:25 2011 -0500

    dmx: force -fno-strict-aliasing for xinput example
    
    Compiler warning:
    xinput.c:272: warning: dereferencing pointer 'e' does break strict-aliasing
    rules
    
    The code itself is the usual XInput client-side code:
            XEvent event;
            XDeviceMotionEvent *e = (XDeviceMotionEvent *)&event;
            XNextEvent(display, &event);
            printf("%d\n", e->type);
    
    Since XDeviceMotionEvent is not guaranteed the same size as XEvent, clients
    must use pointer aliasing as above when using the XNextEvent API. Disable
    strict aliasing for this example.
    
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 3aca8199405cff5097ee5813605ec78b5ae44a43)

commit 53e347b22bb79043243e25891cd7d6f374a8aa23
Author: Keith Packard <keithp@keithp.com>
Date:   Tue Nov 8 10:13:15 2011 -0800

    Save major/minor opcodes in ClientRec for RecordAReply
    
    The record extension needs the major and minor opcodes in the reply
    hook, but the request buffer may have been freed by the time the hook
    is invoked. Saving the request major and minor codes as the request is
    executed avoids fetching from the defunct request buffer.
    
    This patch also eliminates the public MinorOpcodeOfRequest function,
    inlining it into Dispatch. Usages of that function have been replaced
    with direct access to the new ClientRec field.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Reviewed-by: Jamey Sharp <jamey@minilop.net>
    (cherry picked from commit fb22a408c69a84f81905147de9e82cf66ffb6eb2)
    
    Conflicts:
    
    	include/extension.h

commit b736f8c92bae7773ff6e1fca886f9ccc50156488
Author: Julien Cristau <jcristau@debian.org>
Date:   Sat Nov 5 13:00:07 2011 +0100

    Fix ShmPutImage for XYBitmap
    
    We can't call CopyArea in that case because the image has depth 1, which
    might not match the target drawable, so we might overrun the shm
    segment.  Commit 11817a881cb93a89788105d1e575a468f2a8d27c apparently
    fixed a similar bug for XYPixmap, but missed the bitmap case.
    
    Fixes: http://bugs.debian.org/629611
    
    Thanks to Alan Curry for diagnosing this and providing a test case.
    
    Reported-and-tested-by: Alan Curry <pacman@kosh.dhis.org>
    Reviewed-by: Peter Harris <pharris@opentext.com>
    Signed-off-by: Julien Cristau <jcristau@debian.org>
    (cherry picked from commit 08ec4da6a7617637914bee1636858474213cf39d)

commit b2a4c09507b267495ea5e4c2e05373b323c80edf
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Sat Dec 17 12:56:59 2011 -0800

    kdrive/linux: Fix compilation with -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast
    
    Reported-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    Reviewed-by: Jamey Sharp <jamey@minilop.net>
    (cherry picked from commit 1deede3c48d5ac91f50774c79f02afc6e036614e)

commit beaa7ad2ec45811e16722283a8b557a08e91ef18
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Sat Dec 17 12:25:26 2011 -0800

    configure.ac: Make Xephyr dependency error message more informative
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    Reviewed-by: Jamey Sharp <jamey@minilop.net>
    (cherry picked from commit d0170d54c71fc761b8f1ae7a0e555dc2ca23cf9c)

commit 41524dd61020f2a446ec54643fa17aa791338cac
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Dec 16 17:47:46 2011 -0800

    configure.ac: 1.11.3
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

commit ee66474eb2009118a41539c6773e514a09d27e4d
Author: Gaetan Nadon <memsize@videotron.ca>
Date:   Fri Dec 9 07:45:02 2011 -0500

    dmx: fix distcheck failure, missing compsize.h in Makefile.am
    
    which was added in commit:
    dmx: Build fix for -Werror=implicit-function-declaration
    
    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>
    (cherry picked from commit 2c1d0a539c0fb1860ac89a00d1fb609f1959e1b6)

commit 0ca8869e4537412f25bfd5610aba5e604952608c
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Dec 9 12:58:30 2011 -0800

    configure.ac: 1.11.2.902 (1.11.3 RC2)
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

commit e76c397eb90291b048e0b2102111008e3d2e469e
Author: Dave Airlie <airlied@redhat.com>
Date:   Mon Nov 28 16:37:59 2011 +0000

    kdrive: drop screen crossing code.
    
    The only kdrive server we probably care about anymore is Xephyr,
    and this screen enable/disable code totally breaks it in multi-screen mode.
    
    When you are in one screen the other stops updating.
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=757457
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 98c4a888a4428789386c7c47cecc81933b5999ba)

commit db418ff7501d960c8de813a37b8bb37b1ba22175
Author: Dave Airlie <airlied@redhat.com>
Date:   Thu Oct 20 10:48:26 2011 +0100

    hal: free tmp_val in one missing case
    
    Pointed out by coverity scan.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
    (cherry picked from commit 8d3731a811e33e263920dd7c8ec63d02968cb56e)

commit 6b11b18ab683e1f38e5b27066b35947b96956e5f
Author: Dave Airlie <airlied@redhat.com>
Date:   Thu Oct 20 11:00:43 2011 +0100

    xv: test correct number of requests. (v2)
    
    Pointed out by coverity.
    
    v2: fix swapped as well, as pointed out by Alan
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit 41229392b790f30a0f0ef1f4ed95647c5bca4001)

commit df16b789aaf5fe7025e5661117477a5f6f9129ee
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed Oct 19 16:57:13 2011 +0100

    xaa: avoid possible freed pointer reuse in epilogue
    
    If the pGCPriv->flags == 2, then we try to assign the freed pGCPriv->XAAOps
    avoid this by clearing the flags in to be destroyed pGCPriv.
    
    Reported by coverity.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit 1049139499d9132a20cd6d4d156fe9da9cddb6c2)

commit befa8a3b836e8b5781491aff4e659ae856beb494
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed Oct 19 16:22:31 2011 +0100

    Xi: avoid overrun of callback array.
    
    This code had an off-by-one and would allow writing one past the end of
    the callbacks array.
    
    Pointed out by coverity.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit 682c09a2cedd234b005334cc01247d859dd7f26a)

commit b22783f483d440a005ff76d5c7894e2cf2a95dcb
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed Oct 19 16:21:26 2011 +0100

    xext: don't free uninitialised pointer when malloc fails. (v2)
    
    Initialise the pAttr->values to values so if the values allocation
    fails it just ends up as free(NULL).
    
    Pointed out by coverity.
    
    v2: use Alan's suggestion.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit b62dc4fcbcffd10de16650bee284702c8608bb60)

commit 083599c5597276289af9adaf8a8571cbe743c3fd
Author: Adam Jackson <ajax@redhat.com>
Date:   Thu Apr 28 13:34:28 2011 +1000

    fbdevhw: iterate over all modes that match a mode. (v3)
    
    So on RHEL5 anaconda sets an xorg.conf with a fixed 800x600 mode in it,
    we run radeonfb and fbdev since ati won't work in userspace due to domain
    issues in the older codebase.
    
    On certain pseries blades the built-in KVM can't accept an 800x600-43 mode,
    it requires the 800x600-60 mode, so we have to have the kernel radeonfb
    driver reject the 800x600-43 mode when it sees it. However then fbdev
    doesn't try any of the other 800x600 modes in the modelist, and we end up
    getting a default 640x480 mode we don't want.
    
    This patch changes the mode validation loop to continue on with the other modes
    that match to find one that works.
    
    v2: move code around to avoid extra loop, after comment from Jamey.
    v3: move loop setup back into loop as per Jeremy's review.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Jamey Sharp <jamey@minilop.net>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit 22605effd188436629a0dbc688666549473741e4)

commit 05a890df0ade7c4958a2a13ed0c6471e4658a098
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Dec 1 23:45:42 2011 -0800

    LoaderOpen returns either a valid pointer or NULL, so don't check for < 0
    
    Fixes Sun cc warning that was recently elevated to error by the
    stricter default CFLAGS changes to xorg-macros:
    
    "loadmod.c", line 914: improper pointer/integer combination: op "<"
    
    Should have been changed when commit ab7f057ce9df4e905b12 changed the
    LoaderOpen return type from int to void *.
    
    Changes log message when file is found but dlopen() fails from:
     (EE) LoadModule: Module dbe does not have a dbeModuleData data object.
     (EE) Failed to load module "dbe" (invalid module, 0)
    to:
     (EE) Failed to load module "dbe" (loader failed, 7)
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit e4dcf580f007d6adcf5b0c639865d7aaab1a319d)

commit f4944108421d6ae4c728290baa43291f55ebaa67
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Wed Nov 23 00:30:02 2011 -0800

    Limit the number of screens Xvfb will attempt to allocate memory for
    
    Commit f9e3a2955d2ca7 removing the MAXSCREEN limit left the screen
    number too unlimited, and allowed any positive int for a screen number:
    
    Xvfb :1 -screen 2147483647 1024x1024x8
    
    Fatal server error:
    Not enough memory for screen 2147483647
    
    Found by Parfait 0.3.7:
    Error: Integer overflow (CWE 190)
       Integer parameter of memory allocation function realloc() may overflow due to multiplication with constant value 1112
            at line 293 of hw/vfb/InitOutput.c in function 'ddxProcessArgument'.
    
    Since the X11 connection setup only has a CARD8 for number of SCREENS,
    limit to 255 screens, which is also low enough to avoid overflow on the
    sizeof(*vfbScreens) * (screenNum + 1) calculation for realloc.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Jamey Sharp <jamey@minilop.net>
    (cherry picked from commit feebf6746374aa04b12e9e3e51313a3a82c03530)

commit bed7d7f31ed48cbf0931ca77fdac135e514a2a44
Author: Rui Matos <tiagomatos@gmail.com>
Date:   Tue Nov 1 21:32:36 2011 +0000

    randr: Make the RRConstrainCursorHarder logic the same as miPointerSetPosition
    
    The constraining logic in RRConstrainCursorHarder allows the cursor to reach
    crtc positions of x = width and y = height while the constraining code in
    miPointerSetPosition only allows it to reach x = width - 1 and y = height - 1
    for the analogous screen case.
    
    This patch makes the former's logic equivalent to the latter's which allows
    applications to benefit from Fitts's law. E.g. a maximized application
    adjacent to a crtc border wouldn't get pointer events if the user moved the
    pointer all the way until it's contained.
    
    Signed-off-by: Rui Matos <tiagomatos@gmail.com>
    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 9cc44b955b27de33348d6a20bebc9704930ee18e)

commit 4689c84a07f87d35492feeae2bc59642c31b6eb3
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Mon Nov 28 00:07:29 2011 -0800

    configure.ac: 1.11.2.901 (1.11.3 RC1)
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

commit e2661ddbc5d1b2edb1ab514a761f8c0b66e69736
Author: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Date:   Sun Nov 6 12:20:51 2011 -0500

    Fix vesa's VBE PanelID interpretation
    
    xserver's VESA driver's VBE (Vesa BIOS Extensions) code
    includes a PanelID probe, which can get a monitor's native
    resolution. From this, using CVT formulas, it derives
    horizontal sync rate and a vertical refresh rate ranges.
    
    It however, only derives the upper bounds of the ranges, and
    the lower bounds cannot de derived. By default, they are set
    to hardcoded constants which represent the lowest supported
    resolution: 640x480. The constants in vbe.c however, were
    not actually derived from forulas, but carried over from
    other code from the bad old days, and are not relevant
    to flat panel displays. This caused, for example, EEEPC701's
    panel, with a native resolution of 800x480, to end up with
    a upper bound of the horizontal sync rate that was lower
    than the hardcoded lower bound, which of course broke things.
    
    These numbers have been rederived using both my own CVT tool
    based on xf86CVTMode(), and using the provided 'cvt' tool
    that comes with xserver.
    
    Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit f0d50cc6651dce3a8a3cd3fb84210aa92b139763)

commit 2e3406fc6737539210e29ac0b2821848e6d1f069
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Mon Nov 7 22:14:30 2011 +0000

    dmx: Build fix for -Werror=implicit-function-declaration
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit f405dfffe7d5db81d398615a80acbeba7e014ada)

commit b440fc9c1bb10f8c227120e6d9e58101108d71bb
Author: dtakahashi42 <dtakahashi42@gmail.com>
Date:   Fri Nov 18 11:30:22 2011 -0800

    rootless: Fix a server crash when choosing a color with the gimp color wheel
    
    https://trac.macports.org/ticket/30927
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit 328074890eeb111950e984c6f618311983600b20)

commit 40c1287f36517f0afd62306e306f6a68120d9a59
Author: Ross Burton <ross@linux.intel.com>
Date:   Wed Sep 28 11:46:02 2011 +0100

    edid: Add quirk for Acer Aspire One 110
    
    At least one revision of the AAO reports a 190x110mm maximum size but a
    451x113mm mode.
    
    X.Org Bug 41141 <https://bugs.freedesktop.org/show_bug.cgi?id=41141>
    
    Signed-off-by: Ross Burton <ross@linux.intel.com>
    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit 58864146fbdf1820d04825838691e84784ef91bc)

commit 7972e2dade58158bb98f5b7dc5f873b9fb3446de
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Aug 25 16:04:04 2011 +0100

    dri2: Register the DRI2DrawableType after server regeneration
    
    The Resource database is reset upon regeneration and so the dri2 module
    needs to re-register its RESTYPE for the drawable or else it will
    clobber the next unsuspecting user of the database. Fortunately, DRI2 is
    loaded late in the initialisation sequence and was last up until
    xf86-video-intel started using the Resource database to track
    outstanding swaps...
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
    (cherry picked from commit 34b0e4eee911f8b09a3682a7f1b4c8598ef48b8d)

commit 73beaf9033d9a44e7a7c654f296624c7265eeb6d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Jan 24 11:17:03 2011 +0000

    DRI2: Avoid a NULL pointer dereference
    
    Bugzilla:  https://bugs.freedesktop.org/show_bug.cgi?id=41211
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit bfa1a0dd190ed88020d60eba3bb04681c8e83a68)

commit 6105fcaa3592cb6d0d5f22d9b850986d0bc4d241
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Jan 24 11:17:03 2011 +0000

    VidMode: prevent crash with no modes
    
    Bugzilla:  https://bugs.freedesktop.org/show_bug.cgi?id=17431
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit eeb21a133b982f71de739baf62e53c8a68f5d495)

commit d113b2911573f3685dc644c6fdd1979aa880b99f
Author: Rami Ylimäki <rami.ylimaki@vincit.fi>
Date:   Tue Oct 4 12:25:26 2011 +0300

    record: Prevent out of bounds access when recording a reply.
    
    Any pad bytes in replies are written to the client from a zeroed
    array. However, record extension tries to incorrectly access the pad
    bytes from the end of reply data.
    
    Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
    Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi>
    (cherry picked from commit c1bb8f43b9290c2b18a9f0ac59773ff8f1eb974f)

commit 4dc5b6ea9f4932070c37b7c5393d468d00803712
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Tue Nov 1 14:59:15 2011 -0700

    xfree86: Fix powerpc build with -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast
    
    memType is a uint64_t on powerpc. Using memType only really makes
    sense for *physical* addresses, which can be 64-bit for 32-bit
    systems running on 64-bit hardware.
    
    However, unmapVidMem() only deals with *virtual* addresses, which
    are guaranteed to fit into an uintptr_t.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
    (cherry picked from commit eb3377ffb8a7baa26c9831e56ed782d48b28fa71)

commit a1925f08790083a5c00f9f4ba766cbb8749240f3
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Apr 15 13:32:10 2011 +1000

    include: export GetProximityEvents and QueueProximityEvents
    
    This is mainly needed for consistency with GetPointerEvents and friend.
    No-one seems to actually need this function from outside the usual DDXs.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit fc16917ad6f0d2722bfb5c5eeca955dd3bc4125a)

commit a6a21f84bbdd4e3c6218f7b4c04a2d947a784f9f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Nov 3 08:58:58 2011 +1000

    dix: Don't let a driver without a ProximityClassRec post events
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit 11840595a1be9f2df7390bcc708cc176e60d3ef2)

commit 2f2d871ccdfb256831ae487c5916054a3d29d126
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Oct 27 11:03:39 2011 +1000

    Xi: allow passive keygrabs on the XIAll(Master)Devices fake devices
    
    They don't have a KeyClassRec, but we must still allow passive grabs on
    them.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Tested-by: Bastien Nocera <hadess@hadess.net>
    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
    (cherry picked from commit 22715e465b415b3351b83b8279a4f44157f63199)

commit 34bb83b9df20ff63dbb147ed661f39efb8bae8e4
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Oct 24 12:00:32 2011 +1000

    dix: block signals when closing all devices
    
    When closing down all devices, we manually unset master for all attached
    devices, but the device's sprite info still points to the master's sprite
    info. This leaves us a window where the master is freed already but the
    device isn't yet. A signal during that window causes dereference of the
    already freed spriteInfo in mieqEnqueue's EnqueueScreen macro.
    
    Simply block signals when removing all devices. It's not like we're really
    worrying about high-responsive input at this stage.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=737031
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    (cherry picked from commit d7c44a7c9760449bef263413ad3b20f19b1dc95a)

commit 97f2ae60fc0cc755abd8b88df826fcb1a20464fe
Author: Christopher Yeleighton <giecrilj@stegny.2a.pl>
Date:   Mon Oct 24 18:47:06 2011 -0700

    Bug 38420: Xvfb crashes in miInitVisuals() when started with depth=2
    
    https://bugs.freedesktop.org/show_bug.cgi?id=38420
    
    Exit with fatal error message, not segfault.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 7d50211ab57a35910d79fc3f67ae89aff91fa995)

commit 89626304ea1ad316c5b7145a40f09377148cff21
Author: Dave Airlie <airlied@redhat.com>
Date:   Thu Oct 20 14:43:01 2011 +0100

    xf86Crtc: handle no outputs with no modes harder.
    
    If you started an X server with no connected outputs, we pick a default
    1024x768 mode, however if you then ran an xvidmode using app against that
    server it would segfault the server due to not finding any valid modes.
    
    This was due to the no output mode set code, only adding the modes to the
    scrn->modes once, when something called randr 1.2 xf86SetScrnInfoModes would
    get called and remove all the modes and we'd end up with 0.
    
    This change fixes xf86SetScrnInfoModes to always report a scrn mode of at
    least 1024x768, and pushes the initial configuration to just call it instead
    of setting up the mode itself.
    
    Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=746926
    
    I've seen other bugs like this on other distros so it might also actually fix them.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 17416e88dcfcc584fe5f87580d5d2b719b3521c3)

commit c68a84e73d1ebb2f75cdc4c3d8576a15b31ab3f7
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Nov 4 10:24:08 2011 -0700

    configure.ac: Bump to 1.11.2
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

commit 2d6760f591a4138b2f4a32220e6a5aa855c123ca
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Thu Nov 3 15:01:35 2011 -0700

    Revert "dix: don't XWarpPointer through the last slave anymore (#38313)"
    
    This reverts commit bbe6a69da398dba93679c23c3c50f9916cb562ca.
    
    This commit caused a regression.
    
    See: http://xquartz.macosforge.org/trac/ticket/517#comment:10

commit 0bffe6b38cdf6b21d9ec9b0abf0092d4d4eaef86
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Oct 28 18:32:28 2011 -0700

    configure.ac: Bump to 1.11.1.902 (1.11.2 RC2)
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>

commit a1d638da0d12c82c944bfecb996903210879f426
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Tue Oct 25 23:53:43 2011 -0700

    XWin: windowswm: Correct byte swapping in event notifications
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
    (cherry picked from commit 286fa9bf9b4ffb0f9dbd3f1cae46ddcb27ee9318)

commit 0715469f1cb150261b51867df75892d26916ea05
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Tue Oct 25 23:49:33 2011 -0700

    XQuartz: appledri: Correct byte swapping in event notifications
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit dc054fefc586c5b404fe0f949dbd456e5267c647)

commit bc2600466eea2af2d6a81fe1592d908565995cb2
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Tue Oct 25 23:48:16 2011 -0700

    XQuartz: applewm: Correct byte swapping in event notifications
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit d5fee2b638fabeb8bec31a24e57d5c2a232d0893)

commit 7be5492bcfab540676d6f849b85ad3db64a5ada0
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Fri Oct 21 10:27:16 2011 -0700

    XQuartz: appledri: Allow byte swapped requests
    
    Even though it's only valid when local, it is possible for a local
    client and the server to not match endianness, such as when running
    a ppc application under Rosetta.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit 1c8bda798b4480bab0f0da6f531e4770c7a1f771)

commit 0ad049706d2fa8ff2758c42bdd412fb62bb1e86a
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Thu Oct 20 22:34:44 2011 -0700

    XQuartz: appledri: Fix byte swapping in replies
    
    Even though it's only valid when local, it is possible for a local
    client and the server to not match endianness, such as when running
