commit 6b767cdf6574081164aa6c6a7b617cda579b84c6
Author: Matt Turner <mattst88@gmail.com>
Date:   Tue Apr 13 10:01:34 2021 -0400

    xserver 1.20.11
    
    Signed-off-by: Matt Turner <mattst88@gmail.com>

commit a1a1aa2c14636284669b28a956d756d5705dcf15
Author: Matthieu Herrb <matthieu@herrb.eu>
Date:   Sun Mar 21 18:38:57 2021 +0100

    Fix XChangeFeedbackControl() request underflow
    
    CVE-2021-3472 / ZDI-CAN-1259
    
    This vulnerability was discovered by:
    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
    
    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>

commit 8890c44a75304097667ac7d42e83e2d78b105cb5
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Sun Feb 21 21:49:58 2021 -0800

    xquartz: Remove a check for NSAppKitVersionNumber >= NSAppKitVersionNumber10_7
    
    This check is always true on our supported systems.
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 5ae47a9d579e8cb0fbe938455faea53ed75d7098)

commit 3c3680c366f78168e828e4a35d41a048c6e2bb54
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Sun Feb 21 21:49:14 2021 -0800

    xquartz: Don't include strndup.c any more since we no longer support 10.8 and older
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit b960675257d301605def6008bddcccb0980a3c4c)

commit e1fdc856aedfcb4788011415930a0c6861df5123
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Sun Feb 21 20:58:42 2021 -0800

    xquartz: Add a launch trampoline to better integrate with modern versions of macOS
    
    Fixes: https://github.com/XQuartz/XQuartz/issues/6
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 694724e42c4a3eadb32891220084b03504f9586b)

commit 8f8e9c53e71ca58e8c23482d8f37687840371cda
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Fri Feb 19 23:16:56 2021 -0800

    xquartz: Don't process AppKit events if we haven't finished initializing
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 25035229b73742f9e6a96ac3e535b30b5c6196a8)

commit aa6f84021aaae145f54ebf98787e363e1c2022c6
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Sat Feb 20 17:24:14 2021 -0800

    xquartz: Allocate each fbconfig separately
    
    A change during the 1.20 development cycle resulted in fbconfigs being walked
    and deallocated individually during __glXScreenDestroy.  This change
    now avoids a use-after-free caused by that change.
    
    ==50859==ERROR: AddressSanitizer: heap-use-after-free on address 0x00010d3819c8 at pc 0x0001009d4230 bp 0x00016feca7a0 sp 0x00016feca798
    READ of size 8 at 0x00010d3819c8 thread T5
        #0 0x1009d422c in __glXScreenDestroy glxscreens.c:448
        #1 0x10091cc98 in __glXAquaScreenDestroy indirect.c:510
        #2 0x1009d2734 in glxCloseScreen glxscreens.c:169
        #3 0x100740a24 in dix_main main.c:325
        #4 0x10023ed50 in server_thread quartzStartup.c:65
        #5 0x199ae7fd0 in _pthread_start+0x13c (libsystem_pthread.dylib:arm64e+0x6fd0)
        #6 0x199ae2d38 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1d38)
    
    0x00010d3819c8 is located 200 bytes inside of 12800-byte region [0x00010d381900,0x00010d384b00)
    freed by thread T5 here:
        #0 0x101477ba8 in wrap_free+0x98 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3fba8)
        #1 0x1009d4240 in __glXScreenDestroy glxscreens.c:449
        #2 0x10091cc98 in __glXAquaScreenDestroy indirect.c:510
        #3 0x1009d2734 in glxCloseScreen glxscreens.c:169
        #4 0x100740a24 in dix_main main.c:325
        #5 0x10023ed50 in server_thread quartzStartup.c:65
        #6 0x199ae7fd0 in _pthread_start+0x13c (libsystem_pthread.dylib:arm64e+0x6fd0)
        #7 0x199ae2d38 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1d38)
    
    previously allocated by thread T5 here:
        #0 0x101477e38 in wrap_calloc+0x9c (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3fe38)
        #1 0x100925a40 in __glXAquaCreateVisualConfigs visualConfigs.c:116
        #2 0x10091cb24 in __glXAquaScreenProbe+0x224 (X11.bin:arm64+0x100730b24)
        #3 0x1009cd840 in xorgGlxServerInit glxext.c:528
        #4 0x10074539c in _CallCallbacks dixutils.c:743
        #5 0x100932a70 in CallCallbacks callback.h:83
        #6 0x100932478 in GlxExtensionInit vndext.c:244
        #7 0x10020a364 in InitExtensions miinitext.c:267
        #8 0x10073fe7c in dix_main main.c:197
        #9 0x10023ed50 in server_thread quartzStartup.c:65
        #10 0x199ae7fd0 in _pthread_start+0x13c (libsystem_pthread.dylib:arm64e+0x6fd0)
        #11 0x199ae2d38 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1d38)
    
    Regressed-in: 4b0a3cbab131eb453e2b3fc0337121969258a7be
    CC: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 487286d47260782d331229af10df17711cbca1ea)

commit 7aa51bb5728f001bdffdca7f669db1678d903160
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Sat Feb 20 15:17:18 2021 -0800

    xquartz: Fix a compiler warning about const incompatible pointer assignment
    
    driWrap.c:541:30: error: assigning to 'GCOps *' (aka 'struct _GCOps *') from 'const GCOps *' (aka 'const struct _GCOps *') discards
          qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
            pGCPriv->originalOps = pGC->ops;
                                 ^ ~~~~~~~~
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 6a83fb51b7a8b2e167e7d6380229b69e5452f91f)

commit d751c46bd7ce1f350df04cfc9ec9f3ba73058ccd
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Thu Feb 18 23:16:15 2021 -0800

    xquartz: Fix build with sparkle enabled
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit a3ddcdd56c246e2226c7cdf372c2a1294eb6d888)

commit 03c2e12a82e772461e069addbafdecdfff029ca5
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Thu Feb 18 12:43:53 2021 -0800

    xquartz: Silence a compiler warning about missing internal methods on NSApplication
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 279bcbd9cf9e557a6789d6e4cede8e8799c3788e)

commit fcbd57367ef2daa125d7acbbf00953477f9dc5cc
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Thu Feb 18 22:19:21 2021 -0800

    xquartz: Rewrite Window menu handling to not depend on X11App.windowsMenu.numberOfItems being correct in -awakeFromNib
    
    Fixes: https://github.com/XQuartz/XQuartz/issues/56
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit fe89c70e472a9da0541b798eea60c5362b49a99d)

commit b27c6602b39e02aa7ef25ea03b59ef499fc3dc1e
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Thu Feb 18 15:41:29 2021 -0800

    xquartz: Convert X11Controller ivars into @properties
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 41aed8f69634ec61ea0e40fff1cfdaf868be843e)

commit 625c7e4deced7e57a724b05750a92586a2785ff0
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Thu Feb 18 14:39:46 2021 -0800

    xquartz: Convert X11Application ivars into @properties
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit c2750e1fab774c8e6675ecf284124ff55b5be9cf)

commit 3017fec60581c1ab32ad3d6768baf04179fda5e2
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Thu Feb 18 14:47:50 2021 -0800

    xquartz: Fold quartzCommon.h into quartz.h
    
    Everything declared in it comes from quartz.c, so match reality.
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit f51b97b0de2e562e341f2d72c5f00a74c71a159f)

commit bdaff44f98587fd0112f3d86a461ee3ce190277c
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Thu Feb 18 13:00:43 2021 -0800

    xquartz: Fold away some unnecessary hops to X11Controller through X11Application
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 4b4500c48f06e7ef41cd94f417e49b3f4f1412ae)

commit 7d22031a6bd949f9357904310422901515a5ace7
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Thu Feb 18 09:41:30 2021 -0800

    xquartz: Fold away array_with_strings_and_numbers and simplify with more modern Objective-C
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 39c0e1c0ab6a0a89a71f26446973c779ca7fd927)

commit 937b63ff44edecc58ef020a0bfa453d98332482c
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Thu Feb 18 09:33:56 2021 -0800

    xqaurtz: Remove message_kit_thread() and use dispatch instead
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 87f8fe1f74f10faf0ffc84f03539799ad4c2465e)

commit e531d3a4cbca1a689189fe512fed7d7aeb84de34
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Wed Feb 17 23:58:53 2021 -0800

    xquartz: Use objc_autoreleasePoolPush / objc_autoreleasePoolPop directly in QuartzBlockHandler
    
    It violates @autoreleasepool best practices, and this helps collapse quartzCocoa.m into quartz.c
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 94e4e173486c2a94ddcfd2d0515e1ee6731f6656)

commit 08cf6c90fdc31a563843dceeae3caeb8840951da
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Wed Feb 17 22:04:55 2021 -0800

    xquartz: Minor code modernization -- @autoreleasepool adoption
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit fba421f700498fa382089df47942df36a2d75ce6)

commit 26e0c59a970229b343d00e6343436cbde2ce6354
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Wed Feb 17 20:55:06 2021 -0800

    xquartz: Remove some dead code for compatibility with older nibs
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 318f8a4a8a47a0ce4bbbf4290469e933602c9b30)

commit 2853f38965f521cafb8991737db1c655960acc72
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Thu Feb 18 16:05:34 2021 -0800

    xquartz: Remove a workaround for AppKit versions older than Lion
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 72a39dccf99191fbfbb4b399c446fd017d55f24e)

commit 1edc9b980b49e6f9c79f90b7045f9f94c5553247
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Thu Feb 18 22:26:08 2021 -0800

    xquartz: Apply spell check fixes from master for easier cherry-picking of changes in xquartz
    
    See also: 23e83724df4809fd7857cc609c33ce7e8d3021a4
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>

commit 67f25cc1870a587f0e687da9f1281031b6543533
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Wed Feb 17 15:45:45 2021 -0800

    xquartz: Fix applications menu table background color for dark mode
    
    Fixes: https://github.com/XQuartz/XQuartz/issues/32
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 7e2875035800887f3f41f75cba4299088daf939a)

commit 4028c2ad14a71e6b0c8a892a154f1a50736f2dd5
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Wed Feb 17 15:16:26 2021 -0800

    xquartz: Apply Xcode 12.4 automatic updates to nibs
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 85beee9885a8e65960fbbde2de9aa28598b4d6ae)

commit ff1c8e2f72a7dc978187a46e089577b09c009c27
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Wed Feb 17 13:38:31 2021 -0800

    xquartz: Update the about box copyright to 2021
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 4e892aa6e132447e43d7bae7e3aca4f1fb172f93)

commit a16df6028458597c1ab722c7fe3464e6dd315b43
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Mon Feb 1 16:27:38 2021 -0800

    xquartz: Ensure we call into TIS on the main thread
    
    There is a place where this code was called on the main thread.
    
    We're using a rather nasty anti-pattern to just call a block inline rather
    than synchonously calling it on the main thread if we're already on the main
    thread.  This code could use a good overhaul, but I don't have time to rip
    it apart right now.  This will address the immediate issue.
    
    Fixes: https://github.com/XQuartz/XQuartz/issues/40
    Fixes: https://github.com/XQuartz/XQuartz/issues/48
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit c9a3b14c1472632afaff340f73a77a2b961f195a)

commit 2087b7782cde6e6a6c5b4786c2c1f136ee18bb51
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Wed Jan 27 15:03:46 2021 -0800

    xquartz: Ensure that NSRunAlertPanel() is run on the main thread
    
    Fixes: https://github.com/XQuartz/XQuartz/issues/30
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 520e7a1310ddc25b30bcaa0ea3eeaa6c4d137c8c)

commit 2fe5bf4badb21479511479914def04bf29312e4d
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Wed Jan 27 13:46:02 2021 -0800

    xquartz: Remove support for older versions of libXplugin
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 7d0bb7ed061458698ff27856976939b261e73b23)

commit bc1a2a0d830c76b03c5210b4059aea0f0470f095
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Wed Jan 27 13:43:01 2021 -0800

    xquartz: Remove unused include of AvailabilityMacros.h from various sources
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 5e7c0762e6fdaefc9b8257c0f875432b1877c49e)

commit 393da8b4390f63e6b634a51f733f1b129626ee1a
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Wed Jan 27 13:40:48 2021 -0800

    xquartz: Remove support for building for i386
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 59f22341a8b4cd468d6f37fb17dd7fde347e430b)

commit 43aaa10931b4d3a43c2c575cfd120bea442581ea
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Wed Jan 27 13:35:17 2021 -0800

    xquartz: Remove support for Mountain Lion and earlier versions of macOS
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit aea15a76593f98205e44f20632178dc384c02d57)

commit fb492686d70fc3166c005c273a587dc7dd4da651
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Wed Jan 27 13:33:22 2021 -0800

    xquartz: Remove support for Lion and earlier versions of macOS
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit c0b2d3e099a60f55b18ca9c30373000f12d40fe2)

commit 34784415ad7c369b93cee1deeea98e8610f133f2
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Wed Jan 27 13:29:52 2021 -0800

    xquartz: Remove support for SnowLeopard and earlier versions of macOS
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit cc9cf6f085be6e8264f925a11d67a12ad47a042b)

commit d3f81ecaf99c804728b206155875c52e41f0723b
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Wed Jan 27 13:09:50 2021 -0800

    xquartz: Remove check for libdispatch now that we don't support pre-SnowLeopard
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit f699aac2ea2cf6a3e2d3bdcb2d8179e103de1d4e)

commit 739c5bd32f5683c1e03c96700f5bb499517b3eaf
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Wed Jan 27 13:23:18 2021 -0800

    xquartz: Remove support for Leopard and earlier versions of macOS
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 5ad49102722274f53b9b011082d9e0f202fcd9a4)

commit 2d7eb824996e51875a5bc8b76c159bb52249690c
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Wed Jan 27 13:18:35 2021 -0800

    xquartz: Remove support for Tiger and earlier versions of macOS
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 6e6db055f8b517ae9d63351d4c00fd480cb6b54a)

commit 080f9eb76a13252f0fc132192ab99232df0e0d92
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Wed Jan 27 13:12:34 2021 -0800

    os: Remove support for Tiger and earlier versions of macOS
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 20b86c4060c1d4fbc099675d5100fe17e4ac0147)

commit be9d2fd871139ec491806c0843af59cbac65fc84
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Wed Jan 27 13:25:54 2021 -0800

    xquartz: Remove support for Panther and earlier versions of macOS
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 74aef85bd88a1fdb22d445ad14975232a7bebdd7)

commit d39eb58409a4452353c73d362d847f9262181e10
Author: Jim DeLaHunt <from.github@jdlh.com>
Date:   Mon Dec 11 00:08:52 2017 -0800

    Fix typo "XQaurtz" in Xquartz.man
    
    (cherry picked from commit 0e272ac458fbd530787273073473e566b0ac306e)

commit 1f2b73176f25567e28ac227faffd9311d6b65dff
Author: Christopher Chavez <chrischavez@gmx.us>
Date:   Sat Apr 25 05:09:51 2020 +0000

    XQuartz: recognize F16-F20 and Menu keys
    
    Signed-off-by: Christopher Chavez <chrischavez@gmx.us>
    (cherry picked from commit 462beb5338a44390e2fff03096942b035b509830)

commit ecc4ebf5355503268fc04923115b15b8d2e5d338
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Thu Apr 18 11:37:32 2019 +0100

    xquartz: Add stub ddxInputThread()
    
    Omitted from 4ad21c32
    
    (cherry picked from commit f013979507da96377fad0e58b0699d9de051bb39)

commit f5df31c76118816124be323a3caed22f42cdb50c
Author: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date:   Thu Dec 10 22:32:59 2020 +0100

    meson.build: KMS support also depends on dri2
    
    Kernel modesettings support also depends on dri2, see
    ./hw/xfree86/drivers/modesetting/meson.build
    
    So update meson.build to reflect the changes made in configure.ac by
    commit 9c81b8f5b5d7bc987f73e8ef01a81e61205e58ee
    
    Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
    (cherry picked from commit 5d73a8b59e0d01d1ee4cb484e4b43563cec2eee9)

commit b09f5f42dcc58cf73ae5ca85a65018aaee72e06f
Author: Mariusz Ceier <mceier+freedesktop@gmail.com>
Date:   Wed Dec 2 12:29:15 2020 +0100

    xwayland: Replace LogMessage with LogMessageVerb
    
    LogMessage logs only when the XLOG_VERBOSITY is >= 1, but by default
    XLOG_VERBOSITY is 0.
    
    Signed-off-by: Mariusz Ceier <mceier+freedesktop@gmail.com>
    (cherry picked from commit 95539ab37baa1292d1f2daaa552f9741b0364cad)

commit c17872d50215938b1a5d899d50907ced01b28eb9
Author: Michal Srb <msrb@suse.com>
Date:   Thu Jun 21 13:44:04 2018 +0200

    xkb: Fix heap overflow caused by optimized away min.
    
    Calling strlen on char[4] that does not need to contain '\0' is wrong and X
    server may end up running into uninitialized memory.
    
    In addition GCC 8 is clever enough that it knows that strlen on char[4] can
    return 0, 1, 2, 3 or cause undefined behavior. With this knowledge it can
    optimize away the min(..., 4). In reality it can cause the memcpy to be called
    with bigger size than 4 and overflow the destination buffer.
    
    Fixes: 83913de25d35 (xkb: Silence some compiler warnings)
    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/288
    Signed-off-by: Matt Turner <mattst88@gmail.com>
    (cherry picked from commit 74627d13c75cab7aa73c0e713feae0934e780ba0)

commit bc111a2e67e16d4e6d4f3196ab86c22c1e278c45
Author: Matt Turner <mattst88@gmail.com>
Date:   Tue Dec 1 10:55:00 2020 -0500

    xserver 1.20.10
    
    Signed-off-by: Matt Turner <mattst88@gmail.com>

commit 06d1a032ee491547f7037c3ff042065dc2aeaa99
Author: Matthieu Herrb <matthieu@herrb.eu>
Date:   Thu Nov 12 19:15:07 2020 +0100

    Check SetMap request length carefully.
    
    Avoid out of bounds memory accesses on too short request.
    
    ZDI-CAN 11572 /  CVE-2020-14360
    
    This vulnerability was discovered by:
    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
    
    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
    (cherry picked from commit 446ff2d3177087b8173fa779fa5b77a2a128988b)

commit 7ccb3b0eabb4658daf0ecb2c78a53609ae2c263b
Author: Matthieu Herrb <matthieu@herrb.eu>
Date:   Sun Oct 11 17:05:09 2020 +0200

    Fix XkbSetDeviceInfo() and SetDeviceIndicators() heap overflows
    
    ZDI-CAN 11389 / CVE-2020-25712
    
    This vulnerability was discovered by:
    Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
    
    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
    (cherry picked from commit 87c64fc5b0db9f62f4e361444f4b60501ebf67b9)

commit 440ed5948ba5818abf5ea5fdc5a9d98514658fd3
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Tue Dec 1 11:25:31 2020 +0100

    present/wnmd: Translate update region to screen space
    
    The region as passed in is in the source pixmap's coordinate space, so
    intersecting it with the clipList (which is in screen space) resulted in
    disappointment.
    
    Fixes Firefox popups such as the hamburger menu when using the EGL
    backend.
    
    v2:
    * Drop vblank->x/y_off from RegionTranslate call, since they're always
      0 here (present_wnmd_check_flip rejects flips for x/y_off != 0).
    
    Reported-by: Robert Mader <robert.mader@posteo.de>
    Tested-by: Robert Mader <robert.mader@posteo.de>
    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
    Tested-by: Joakim Tjernlund <joakim.tjernlund@infinera.com> # v1
    (cherry picked from commit 466b8b43fb355c6040cee45406860b8b8c04e948)

commit 54f9af1c61bd10e2e65cbb17069e0c9ec1f9a2c5
Author: Kishore Kadiyala <kishore.kadiyala@intel.com>
Date:   Tue Dec 1 11:13:51 2020 +0100

    modesetting: keep going if a modeset fails on EnterVT
    
    There was a time when setting a mode on a CRTC would not depend on the
    associated connector's state. If a mode had been set successfully once,
    it would mean it would work later on.
    
    This changed with the introduction of new connectors type that now
    require a link training sequence (DP, HDMI 2.0), and that means that
    some events may have happened while the X server was not master that
    would then prevent the mode from successfully be restored to its
    previous state.
    
    This patch relaxes the requirement that all modes should be restored on
    EnterVT, or the entire X-Server would go down by allowing modesets to
    fail (with some warnings). If a modeset fails, the CRTC will be
    disabled, and a RandR event will be sent for the desktop environment to
    fix the situation as well as possible.
    
    Additional patches might be needed to make sure that the user would
    never be left with all screens black in some scenarios.
    
    v2 (Martin Peres):
     - whitespace fixes
     - remove the uevent handling (it is done in a previous patch)
     - improve the commit message
     - reduce the size of the patch by not changing lines needlessly
     - return FALSE if one modeset fails in ignore mode
     - add comments/todos to explain why we do things
     - disable the CRTCs that failed the modeset
    
    Signed-off-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
    Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
    Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Tested-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
    Closes: #1010
    (cherry picked from commit efb3abddd49fb75bd6d0e31046fed43d258c93da)

commit bd0f53725b581e4698f5f3ec366a9507bd2556e2
Author: Martin Peres <martin.peres@linux.intel.com>
Date:   Tue Dec 1 11:10:34 2020 +0100

    modesetting: check the kms state on EnterVT
    
    Normally, we would receive a uevent coming from Linux's DRM subsystem,
    which would trigger the check for disappearing/appearing resources.
    However, this event is not received when X is not master (another VT
    is selected), and so the userspace / desktop environment would not be
    notified about the changes that happened while X wasn't master.
    
    To fix the issue, this patch forces a refresh on EnterVT by splitting
    the kms-checking code from the uevent handling into its own (exported)
    function called drmmode_update_kms_state. This function is then called
    from both the uevent-handling function, and on EnterVT right before
    restoring the modes.
    
    Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
    Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Acked-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
    Tested-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
    (cherry picked from commit 293cf660c95d7ba36510bcc4114d7fd5c5f3801c)

commit 5c400cae1f9817045378966effa6bca91e45aead
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Tue Oct 27 16:33:55 2020 +0100

    configure: Build hashtable for Xres and glvnd
    
    With autoconf, hashtable support is built along with Xres support.
    
    Yet, glvnd also use it, so when disabling Xres from configure, the
    build will fail at link time because hashtable functions are not
    available.
    
    Untie the build of hashtable from Xres support, just like meson build
    does.
    
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1091
    (cherry picked from commit 899cebb76ab7754fea49f7babcd64a7e94052cc8)

commit 253569a3d281996d7c84041020e14313756900da
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Thu Nov 5 18:35:54 2020 +0100

    xwayland: Create an xwl_window for toplevel only
    
    One general assumption in Xwayland is that the xwl_window remains the
    same for all the child windows of the toplevel window.
    
    When mapping a new X11 window, ensure_surface_for_window() checks for an
    existing xwl_window by using xwl_window_get() which will just check for
    the registered xwl_window for the window.
    
    That means that a client mapping a child window of an existing window
    with a xwl_window will get another different xwl_window.
    
    If an X11 client issues a Present request on the parent window, hence
    placed underneath its child window of the same size, the Wayland
    compositor may not send the frame callback event for the parent's
    Wayland surface which is reckoned to be not visible, obscured behind
    the other Wayland surface for the child X11 window.
    
    That bug affects some games running in wine which may get 1 fps because
    the repaint occurs only on timeout with a long interval (as with, e.g.
    https://bugs.winehq.org/show_bug.cgi?id=47066)
    
    Fix ensure_surface_for_window() by using xwl_window_from_window() which
    will walk the window tree, so that a child window won't get another
    xwl_window than its parent.
    
    https://gitlab.freedesktop.org/xorg/xserver/-/issues/1099
    See-also: https://bugs.winehq.org/show_bug.cgi?id=47066
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
    (cherry picked from commit 606ba7fc51e5420646f75c4e672fbe61eb7c7e6e)

commit 0811a9ff783c252b3e4d558bf31c6b066b0633e1
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Mon Nov 2 15:44:31 2020 +0100

    xwayland: non-rootless requires the wl_shell protocol
    
    When running non-rootless, Xwayland requires that the Wayland compositor
    supports the wl_shell protocol.
    
    Check for wl_shell protocol support at startup and exit cleanly if
    missing rather than segfaulting later in ensure_surface_for_window()
    while trying to use wl_shell_get_shell_surface().
    
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
    Reviewed-by: Simon Ser <contact@emersion.fr>
    (cherry picked from commit ffd02d9b26bd560849c407a6dd4f5c4d7d2c1736)

commit b3ae038c32870a4a1bb42b6e1cf2ebedc8b7bc8d
Author: Alex Goins <agoins@nvidia.com>
Date:   Mon Oct 5 18:19:52 2020 -0500

    glamor: Update pixmap's devKind when making it exportable
    
    When making a pixmap exportable, glamor will currently create a temporary
    exported pixmap backed by a GBM bo, with the devKind updated to the stride of
    the bo. However, when the backing of the exported pixmap is swapped into the
    original, the devKind of the original is not updated.
    
    Some GBM bos may get implicitly padded, in which case the devKind of the pixmap
    will not match the stride of the backing bo. For example, an 800x600 pixmap will
    have a devKind of 3200, but the bo's stride will be 3328. This can cause
    corruption with PRIME, when the sink uses the wrong stride to display the shared
    pixmap.
    
    This commit changes glamor_make_pixmap_exportable() to update the devKind of the
    original pixmap after it swaps exported pixmap's backing into it, keeping
    everything consistent.
    
    Fixes issue #1018.
    
    Signed-off-by: Alex Goins <agoins@nvidia.com>
    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
    (cherry picked from commit 7a7e55c5c1d6461a9f4d9a4e0129c1c6e1fd3d66)

commit d6c389cb87b220f7005cebf483708267b5f4a1c3
Author: Bernhard Übelacker <bernhardu@mailbox.org>
Date:   Sun Sep 27 18:03:48 2020 +0200

    os: Fix instruction pointer written in xorg_backtrace
    
    The address retrieved in "pip.start_ip" is not necessarily the same
    address as unw_get_proc_name finds as nearest symbol and returns in "off".
    Therefore using "pip.start_ip + off" is not reliable, at least
    visible in the binaries from the Debian repository.
    
    Bug-Debian: https://bugs.debian.org/971088
    
    Signed-off-by: Bernhard Übelacker <bernhardu@mailbox.org>
    (cherry picked from commit c15dd0ba4893f79f7181e783cb1ba404edca917a)

commit c3e4c1a0fd5d4d6015e9e6317b758018317e56d1
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Tue Jul 28 18:40:47 2020 +0200

    present/wnmd: Execute copies at target_msc-1 already
    
    It always takes one update cycle for the copy to become visible on the
    host windowing system, so waiting for the target MSC resulted in 1 cycle
    delay.
    
    We re-use the idle list for copies which were executed but need their
    completion event sent.
    
    Fixes black seams when resizing the "Builder" sub-window of
    
     GDK_BACKEND=x11 gtk4-demo
    
    on Xwayland (see
    https://gitlab.gnome.org/GNOME/mutter/-/issues/1290#note_873557).
    
    Unfortunately, this cannot completely fix the seams with apps which
    queue up multiple frames in advance, since there's always at least one
    queued frame corresponding to the old window size. But it should at
    least help a little in that case as well.
    
    v2:
    * Bug fix: Don't update exec_msc in present_wnmd_check_flip_window.
      (Roman Gilg)
    * Use exec_msc = target_msc - 1 instead of exec_msc--, and add a
      comment, for clarity.
    v3:
    * Drop exec_msc = target_msc again in present_wnmd_execute.
    * present_execute_copy should never set vblank->queued in
      present_wnmd_execute now, so replace that branch with an assertion.
      (Roman Gilg)
    
    Reviewed-by: Roman Gilg <subdiff@gmail.com>
    Tested-by: Roman Gilg <subdiff@gmail.com>
    (cherry picked from commit 1cccb486d48a5d2e7649836b993805bb65dc09e3)
    [Since present_wnmd_event_notify hasn't been split up on the 1.20
    branch, it needs to check vblank->flip. Doing the same in
    present_wnmd_free_idle_vblanks to be safe, though I'm not sure it's
    actually possible to hit non-flips there.]

commit 96ef31e0f20fcffb2edfe4cb9510f994c188785f
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Tue Jul 28 18:53:45 2020 +0200

    present/wnmd: Move up present_wnmd_queue_vblank
    
    Allowing it to be called from more functions than before. No functional
    change.
    
    Reviewed-by: Roman Gilg <subdiff@gmail.com>
    Tested-by: Roman Gilg <subdiff@gmail.com>
    (cherry picked from commit d14ea667feccf085c7d66a7c63f380975e07af66)

commit 669e40390c3679b649db33f0aa4ae4cfdd17e2a9
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Fri Sep 11 17:00:35 2020 +0200

    present: Add present_vblank::exec_msc field
    
    For tracking the MSC when the present can be executed separately from
    the target MSC.
    
    Allows removing the requeue field instead, plus more later.
    
    v2:
    * Rename wait_msc → exec_msc (Roman Gilg)
    * Use exec_msc = target_msc instead of exec_msc++, for clarity.
    * Bug fix: Set exec_msc = target_msc also if present_flip returned
      false in present_execute.
    v3:
    * Set exec_msc = target_msc also if present_wnmd_flip returned
      false in present_wnmd_execute, for consistency.
    v4:
    * Specifically check for exec_msc == crtc_msc + 1 in
      present_execute_wait/copy, to avoid re-introducing
      https://bugs.freedesktop.org/show_bug.cgi?id=94596 .
    
    Reviewed-by: Roman Gilg <subdiff@gmail.com>
    Tested-by: Roman Gilg <subdiff@gmail.com>
    (cherry picked from commit b0b3159abd8001fa3f6dfc44a288a95a62aa5cf6)

commit dae234efdb7bba75744aa1697386df3c0db5348a
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Fri Sep 11 17:00:18 2020 +0200

    present: Move flip target_msc adjustment out of present_vblank_create
    
    Preparation for different handling between SCMD & WNMD. No functional
    change intended.
    
    Reviewed-by: Roman Gilg <subdiff@gmail.com>
    Tested-by: Roman Gilg <subdiff@gmail.com>
    (cherry picked from commit 4c92dea952f7fed19857904f0f552900257ef4b9)

commit 1930ed233fdec5d22e4fc192769a0126faabb3ea
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Mon Sep 14 15:39:10 2020 +0200

    xwayland: Remove pending stream reference when freeing
    
    The EGLStream backend keeps a queue of pending streams for each Xwayland
    window.
    
    However, when this pending queue is freed, the corresponding private
    data may not be cleared (typically if the pixmap for this window has
    changed before the compositor finished attaching the consumer for the
    window's pixmap's original eglstream), leading to a use-after-free and a
    crash when trying to use that data as the window pixmap.
    
    Make sure to clear the private data when the pending stream is freed.
    
    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1055
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
    Tested-by: Karol Szuster <karolsz9898@gmail.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit a5f439dcd21b4fda093cb382bb1a758b434a1444)

commit 1ac389dda89b2882c80767c91bbe88e01818491c
Author: Greg V <greg@unrelenting.technology>
Date:   Tue Sep 15 17:41:04 2020 +0300

    xwayland: use drmGetNodeTypeFromFd for checking if a node is a render one
    
    Major/minor numbers are a.. major (ha) source of pain in FreeBSD porting.
    In this case, Xwayland was thinking that /dev/dri/card0 is already a render node,
    because the st_rdev on FreeBSD was passing the Linux-style check,
    and because of the assumption, acceleration would fail because
    various ioctls like AMDGPU_INFO would be denied on the non-render node.
    
    Switch to libdrm's function that already works correctly on all platforms.
    
    Signed-off-by: Greg V <greg@unrelenting.technology>
    Reviewed-by: Emmanuel Vadot <manu@FreeBSD.org>
    (cherry picked from commit 239ebdc9e447d4f836d0c2aa6068c6064fffb46c)

commit d108c2c82cba242ea5998d7c91254d90d3a5db71
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Fri Sep 11 11:30:18 2020 +0200

    xwayland: Do not discard frame callbacks on allow commits
    
    Currently, when a X11 client (usually the X11 window manager from a
    Wayland compositor) changes the value of the X11 property
    `_XWAYLAND_ALLOW_COMMITS` from `false` to `true`, all pending frame
    callbacks on the window are discarded so that the commit occurs
    immediately.
    
    Weston uses that mechanism to prevent the content of the window from
    showing before it's ready when mapping the window initially, but
    discarding the pending frame callbacks has no effect on the initial
    mapping of the X11 window since at that point there cannot be any frame
    callback on a surface which hasn't been committed yet anyway.
    
    However, discarding pending frame callbacks can be problematic if we
    were to use the same `_XWAYLAND_ALLOW_COMMITS` mechanism to prevent
    damages to be posted before the X11 toplevel is updated completely
    (including the window decorations from the X11 window manager).
    
    Remove the portion of code discarding the pending frame callback,
    Xwayland should always wait for a pending frame callback if there's one
    before posting new damages.
    
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
    Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
    https://gitlab.freedesktop.org/xorg/xserver/merge_requests/333
    (cherry picked from commit 66da95a172c4941b75ffedcdaa0138c0a48f11fb)

commit 174cb91d82d643f78d8ba2b9999312b9d7dea98c
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Mon Sep 7 18:40:34 2020 +0200

    present/wnmd: Remove dead check from present_wnmd_check_flip
    
    present_wnmd_toplvl_pixmap_window returns a window with the same window
    pixmap, so the check could never fail.
    
    Reviewed-by: Roman Gilg <subdiff@gmail.com>
    (cherry picked from commit b6b1161fd7ac409156fb69439897bcabdeacf393)

commit 51ee6e5ceb0cacc8e2fa225ad5391ffb159e36a0
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Mon Sep 7 18:39:17 2020 +0200

    xwayland: Check window pixmap in xwl_present_check_flip2
    
    We can only flip if the window pixmap matches that of the toplevel
    window. Doing so regardless could cause the toplevel window pixmap to
    get destroyed while it was still referenced by the window, resulting in
    use-after-free and likely a crash.
    
    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1033
    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
    Reviewed-by: Roman Gilg <subdiff@gmail.com>
    (cherry picked from commit 4c25356d6cd908c5030c70e712076dff318ac00d)

commit f4006d795cb199bf7deeb00f542c592db6a5becb
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Mon Sep 7 18:35:10 2020 +0200

    present/wnmd: Can't use page flipping for windows clipped by children
    
    Noticed this was missing while working on the following fix.
    
    v2:
    * Dropped present_wnmd_can_window_flip hunk (that function is never
      called, will be cleaned up in a follow-up MR).
    
    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com> # v1
    Reviewed-by: Roman Gilg <subdiff@gmail.com>
    (cherry picked from commit 7ac303c7b1e3b1be79ba3648e217798683e65a99)

commit 1e84fda2020b12a83c6b9c6d31ab84f993c6176c
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Tue Sep 1 11:24:57 2020 +0200

    xfree86: Take second reference for SavedCursor in xf86CursorSetCursor
    
    The same pointer is kept in CurrentCursor as well, therefore two
    RefCursor calls are needed.
    
    Fixes use-after-free after switching VTs.
    
    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1067
    (cherry picked from commit 919f1f46fc67dae93b2b3f278fcbfc77af34ec58)

commit 8c3c8bda2c44fb3d62b954b02b08e3b1771ef5bc
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Tue Aug 25 17:26:56 2020 +0200

    glamor: Fix glamor_poly_fill_rect_gl xRectangle::width/height handling
    
    (Using GLSL 1.30 or newer)
    
    The width/height members of xRectangle are unsigned, but they were
    being interpreted as signed when converting to floating point for the
    vertex shader, producing incorrect drawing for values > 32767.
    
    v2:
    * Use separate GL_UNSIGNED_SHORT vertex attribute for width/height.
      (Eric Anholt)
    
    Reviewed-by: Eric Anholt <eric@anholt.net>
    (cherry picked from commit 032af35657aa95c6bbdb74ff8c72e535b9b56cfa)

commit b28c882889cbea9be3748d3dee1b21ba6eb90b66
Author: Arthur Williams <taaparthur@gmail.com>
Date:   Fri Sep 25 04:52:57 2020 +0000

    include: Increase the number of max. input devices to 256.
    
    Extending the decade old f0124ed93, to increase the number of input
    devices from 40 to 256. 40 translates at most 9 MD, while 256 will allow
    63 MD. It is an arbitrary number, but people are hitting the current
    limit under reasonable conditions.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64793
    Signed-off-by: Arthur Williams <taaparthur@gmail.com>
    
    (cherry picked from commit fe439596b99db65bbae35eff1ea0b79db167f8d6)

commit af4c84ce8855e84c0ad89b929bc972e884f0b8e3
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Tue Sep 8 10:03:33 2020 +0200

    Revert "linux: Make platform device probe less fragile"
    
    This reverts commit 74b7427c41b4e4104af7abf70a996c086d3d7628.
    
    https://gitlab.freedesktop.org/xorg/xserver/-/issues/1068
