diff -Nru xorg-server-21.1.3/ChangeLog xorg-server-21.1.4/ChangeLog --- xorg-server-21.1.3/ChangeLog 2022-01-02 22:42:32.000000000 +0000 +++ xorg-server-21.1.4/ChangeLog 2022-07-12 13:28:33.000000000 +0000 @@ -1,3 +1,508 @@ +commit 6bf62381d0a1fb54226a10f9d0e6b03aff12f3aa +Author: Povilas Kanapickas +Date: Tue Jul 12 16:09:23 2022 +0300 + + xserver 21.1.4 + +commit 06b23cccb1166fcccc2f5fe7259b3ef9e1d0f32e +Author: Peter Hutterer +Date: Tue Jul 5 11:11:06 2022 +1000 + + xkb: add request length validation for XkbSetGeometry + + No validation of the various fields on that report were done, so a + malicious client could send a short request that claims it had N + sections, or rows, or keys, and the server would process the request for + N sections, running out of bounds of the actual request data. + + Fix this by adding size checks to ensure our data is valid. + + ZDI-CAN 16062, CVE-2022-2319. + + This vulnerability was discovered by: + Jan-Niklas Sohn working with Trend Micro Zero Day Initiative + + Signed-off-by: Peter Hutterer + (cherry picked from commit 6907b6ea2b4ce949cb07271f5b678d5966d9df42) + +commit e3a530540f2f13739b0233ec51d7a3985a7ec4be +Author: Peter Hutterer +Date: Tue Jul 5 09:50:41 2022 +1000 + + xkb: swap XkbSetDeviceInfo and XkbSetDeviceInfoCheck + + XKB often uses a FooCheck and Foo function pair, the former is supposed + to check all values in the request and error out on BadLength, + BadValue, etc. The latter is then called once we're confident the values + are good (they may still fail on an individual device, but that's a + different topic). + + In the case of XkbSetDeviceInfo, those functions were incorrectly + named, with XkbSetDeviceInfo ending up as the checker function and + XkbSetDeviceInfoCheck as the setter function. As a result, the setter + function was called before the checker function, accessing request + data and modifying device state before we ensured that the data is + valid. + + In particular, the setter function relied on values being already + byte-swapped. This in turn could lead to potential OOB memory access. + + Fix this by correctly naming the functions and moving the length checks + over to the checker function. These were added in 87c64fc5b0 to the + wrong function, probably due to the incorrect naming. + + Fixes ZDI-CAN 16070, CVE-2022-2320. + + This vulnerability was discovered by: + Jan-Niklas Sohn working with Trend Micro Zero Day Initiative + + Introduced in c06e27b2f6fd9f7b9f827623a48876a225264132 + + Signed-off-by: Peter Hutterer + (cherry picked from commit dd8caf39e9e15d8f302e54045dd08d8ebf1025dc) + +commit e75840565775dc95b848b366aeed44066a9d8a28 +Author: Peter Hutterer +Date: Tue Jul 5 12:40:47 2022 +1000 + + xkb: switch to array index loops to moving pointers + + Most similar loops here use a pointer that advances with each loop + iteration, let's do the same here for consistency. + + No functional changes. + + Signed-off-by: Peter Hutterer + Reviewed-by: Olivier Fourdan + (cherry picked from commit f1070c01d616c5f21f939d5ebc533738779451ac) + +commit f3d9c6ff12b5a8a1a9f316b096d5573060747ff9 +Author: Jeremy Huddleston Sequoia +Date: Mon Jul 4 14:16:43 2022 -0700 + + xquartz: Add missing files to distribution tarball + + Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1346 + Signed-off-by: Jeremy Huddleston Sequoia + +commit 147c17fc786c268ec51dc0f0655e69f6493f7ef2 +Author: Jeremy Huddleston Sequoia +Date: Sat Jul 2 14:15:50 2022 -0700 + + XQuartz: Improve type safety for X11Controller's application menu editor + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit 4cfdc5af31ae8282903d0f65cff858330b9f9d1a) + +commit 9e2fc7e2484be7c577ee5baf3765734beef9adc2 +Author: Jeremy Huddleston Sequoia +Date: Sat Jul 2 14:17:18 2022 -0700 + + xquartz: Fix a possible crash when editing the Application menu due to mutaing immutable arrays + + Crashing on exception: -[__NSCFArray replaceObjectAtIndex:withObject:]: mutating method sent to immutable object + + Application Specific Backtrace 0: + 0 CoreFoundation 0x00007ff80d2c5e9b __exceptionPreprocess + 242 + 1 libobjc.A.dylib 0x00007ff80d027e48 objc_exception_throw + 48 + 2 CoreFoundation 0x00007ff80d38167b _CFThrowFormattedException + 194 + 3 CoreFoundation 0x00007ff80d382a25 -[__NSCFArray removeObjectAtIndex:].cold.1 + 0 + 4 CoreFoundation 0x00007ff80d2e6c0b -[__NSCFArray replaceObjectAtIndex:withObject:] + 119 + 5 X11.bin 0x00000001003180f9 -[X11Controller tableView:setObjectValue:forTableColumn:row:] + 169 + + Fixes: https://github.com/XQuartz/XQuartz/issues/267 + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit dfd057996b26420309c324ec844a5ba6dd07eda3) + +commit 86ace20398a6c559e89213622538134b72e448b1 +Author: Jeremy Huddleston Sequoia +Date: Fri Jul 1 14:26:06 2022 -0700 + + xquartz: Use correct defines when building to support Sparkle updates + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit aa636b97c66343b25e508b9c73d8505e8c11b1d9) + +commit 855b96a85bc0711460a2542573a9a3959d1bfefa +Author: Povilas Kanapickas +Date: Sun Dec 19 16:51:39 2021 +0200 + + xfree86: Fix event data alignment in inputtest driver + + This fixes address sanitizer errors when running unit tests. The + additional copying may reduce performance by a small amount, but we + don't care about that because this driver is used for testing only. + + Signed-off-by: Povilas Kanapickas + (cherry picked from commit 7d2014e7d523e10623203582b9f573303750f087) + +commit 9d05ee10c231edacc69b342677ae8c3cc32f97e5 +Author: Povilas Kanapickas +Date: Sun Jan 16 10:42:15 2022 +0200 + + dix: Don't send touch end to clients that do async grab without touches + + GTK3 menu widget creates a selection for touch and other events and + after receiving touch events creates an async grab that excludes touch + events. Unfortunately it relies on X server not sending the touch end + event in order to function properly. Sending touch end event will cause + it to think that the initiating touch ended and when it actually ends, + the ButtonRelease event will make it think that the menu should be + closed. As a result, the menu will be open only for the duration of the + touch making it useless. + + This commit reverts f682e0563f736ed2c2c612ed575e05b6e3db945e. + + Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1255 + + Signed-off-by: Povilas Kanapickas + (cherry picked from commit 43e934a19f644cddedae73602e86429c9dc5074a) + +commit b713e717c34d539486f661c03a0f1b35b3208d21 +Author: Povilas Kanapickas +Date: Sun Jan 23 22:18:52 2022 +0200 + + dix: Correctly save replayed event into GrabInfoRec + + When processing events we operate on InternalEvent pointers. They may + actually refer to a an instance of DeviceEvent, GestureEvent or any + other event that comprises the InternalEvent union. This works well in + practice because we always look into event type before doing anything, + except in the case of copying the event. + + *dst_event = *src_event would copy whole InternalEvent event and would + cause out of bounds read in case the pointed to event was not + InternalEvent but e.g. DeviceEvent. + + This regression has been introduced in + 23a8b62d34344575f9df9d057fb74bfefa94a77b. + + Fixes https://gitlab.freedesktop.org/xorg/xserver/-/issues/1261 + + Signed-off-by: Povilas Kanapickas + (cherry picked from commit 6ef5c05728f8b18170fbc8415d7502495a08670b) + +commit cd3d21d8c44a35c22b7eca61a58bb5620b116102 +Author: Samuel Thibault +Date: Wed Jan 26 00:05:55 2022 +0100 + + xkb: fix XkbSetMap when changing a keysym without changing a keytype + + As the comment says: + + "symsPerKey/mapWidths must be filled regardless of client-side flags" + + so we always have to call CheckKeyTypes which will notably fill mapWidths + and nTypes. That is needed for CheckKeySyms to work since it checks the + width. Without it, any request with XkbKeySymsMask but not + XkbKeyTypesMask will fail because of the missing width information, for + instance this: + + XkbDescPtr xkb; + if (!(xkb = XkbGetMap (dpy, XkbKeyTypesMask|XkbKeySymsMask, XkbUseCoreKbd))) { + fprintf (stderr, "ERROR getting map\n"); + exit(1); + } + XFlush (dpy); + XSync (dpy, False); + + XkbMapChangesRec changes = { .changed = 0 }; + int oneGroupType[XkbNumKbdGroups] = { XkbOneLevelIndex }; + + if (XkbChangeTypesOfKey(xkb, keycode, 1, XkbGroup1Mask, oneGroupType, &changes)) { + fprintf(stderr, "ERROR changing type of key\n"); + exit(1); + } + XkbKeySymEntry(xkb,keycode,0,0) = keysym; + + if (!XkbChangeMap(dpy,xkb,&changes)) { + fprintf(stderr, "ERROR changing map\n"); + exit(1); + } + + XkbFreeKeyboard (xkb, 0, TRUE); + XFlush (dpy); + XSync (dpy, False); + + This had being going under the radar since about ever until commit + de940e06f8733d87bbb857aef85d830053442cfe ("xkb: fix key type index check + in _XkbSetMapChecks") fixed checking the values of kt_index, which was + previously erroneously ignoring errors and ignoring all other checks, just + because nTypes was not set, precisely because CheckKeyTypes was not called. + + Note: yes, CheckKeyTypes is meant to be callable without XkbKeyTypesMask, it + does properly check for that and just fills nTypes and mapWidths in that + case. + + Signed-off-by: Samuel Thibault + (cherry picked from commit 0217cc6e0cf5013366105a90f5f91ccc4bab5425) + +commit f575524314e9f20a1ff639f6bd65386cdbd083f4 +Author: Povilas Kanapickas +Date: Thu Feb 3 20:04:52 2022 +0200 + + Revert "os: Try to discover the current seat with the XDG_SEAT var first" + + This reverts commit b27eaa72837eebe80adfe6c257a71a6b9eaf66ee. + +commit 419fbf639d8f53d39449c157a9554bd5482ed64f +Author: Jeremy Huddleston Sequoia +Date: Sun Jun 26 10:31:54 2022 -0700 + + XQuartz: Add TCC reason keys to Info.plist + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit 9ce7264889e36fddbdf6bac332225ad6f628ad5d) + +commit 66ac50090dd191f1b16daf338ca3b46d9147fbbd +Author: Jeremy Huddleston Sequoia +Date: Sun Jun 26 02:40:20 2022 -0700 + + XQuartz: Build the bundle trampoline when using meson + + This brings the change for e1fdc856aedfcb4788011415930a0c6861df5123 into meson based builds + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit b00cf4aef881e00533f995c141c3586749cd7ca1) + +commit 033d93a021e86dd5ce9b2b3a1554a72c7031a7f2 +Author: Jeremy Huddleston Sequoia +Date: Mon Jun 20 17:08:53 2022 -0700 + + meson: Support building Xnest and Xorg on darwin + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit ef8101560eefd6160df6d4b57ddb65ea2328c441) + +commit 433f53a1a08390a038176b7c1207512cf1dd3f44 +Author: Jeremy Huddleston Sequoia +Date: Mon Jun 20 20:19:06 2022 -0700 + + tests: Fix build failure from missing micmap.c + + FAILED: test/tests + clang -o test/tests test/tests.p/.._mi_miinitext.c.o test/tests.p/fixes.c.o test/tests.p/input.c.o test/tests.p/list.c.o test/tests.p/misc.c.o test/tests.p/signal-logging.c.o test/tests.p/string.c.o test/tests.p/test_xkb.c.o test/tests.p/tests-common.c.o test/tests.p/tests.c.o test/tests.p/touch.c.o test/tests.p/xfree86.c.o test/tests.p/xtest.c.o test/tests.p/hashtabletest.c.o -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -Wl,-undefined,error -fvisibility=hidden -O0 -g3 -gdwarf-2 -mmacosx-version-min=10.9 -Werror=unguarded-availability-new -Werror=format -Werror=objc-method-access -Werror=incompatible-pointer-types -F/Applications/Utilities/XQuartz.app/Contents/Frameworks -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk -arch x86_64 -O0 -g3 -gdwarf-2 -mmacosx-version-min=10.9 -Werror=unguarded-availability-new -Werror=format -Werror=objc-method-access -Werror=incompatible-pointer-types -F/Applications/Utilities/XQuartz.app/Contents/Frameworks -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk -arch x86_64 -Wl,-rpath,/opt/X11/lib mi/liblibxserver_mi.a dix/liblibxserver_dix.a composite/liblibxserver_composite.a damageext/liblibxserver_damageext.a dbe/liblibxserver_dbe.a randr/liblibxserver_randr.a miext/damage/liblibxserver_miext_damage.a render/liblibxserver_render.a present/liblibxserver_present.a Xext/liblibxserver_xext.a miext/sync/liblibxserver_miext_sync.a xfixes/liblibxserver_xfixes.a Xi/liblibxserver_xi.a xkb/liblibxserver_xkb.a record/liblibxserver_record.a os/liblibxserver_os.a os/liblibxlibc.a glx/liblibglxvnd.a hw/xfree86/common/libxorg_common.a hw/xfree86/loader/libxorg_loader.a hw/xfree86/ddc/libxorg_ddc.a hw/xfree86/xkb/libxorg_xkb.a hw/xfree86/i2c/libxorg_i2c.a hw/xfree86/modes/libxorg_modes.a hw/xfree86/os-support/libxorg_os_support.a hw/xfree86/parser/libxorg_parser.a hw/xfree86/ramdac/libxorg_ramdac.a fb/liblibxserver_fb.a Xext/liblibxserver_xext_vidmode.a dix/liblibxserver_main.a config/liblibxserver_config.a /opt/X11/lib/libpixman-1.dylib /opt/X11/lib/libxcvt.dylib /opt/X11/lib/libxkbfile.dylib /opt/X11/lib/libXfont2.dylib /opt/X11/lib/libXdmcp.dylib -lm /opt/X11/lib/libxshmfence.dylib -ldl -lpthread /opt/X11/lib/libXau.dylib /opt/X11/lib/libGL.dylib + Undefined symbols for architecture x86_64: + "_micmapScrPrivateKeyRec", referenced from: + _DGAInstallCmap in libxorg_common.a(xf86DGA.c.o) + _xf86HandleColormaps in libxorg_common.a(xf86cmap.c.o) + _CMapInstallColormap in libxorg_common.a(xf86cmap.c.o) + _CMapEnterVT in libxorg_common.a(xf86cmap.c.o) + _CMapSwitchMode in libxorg_common.a(xf86cmap.c.o) + _CMapSetDGAMode in libxorg_common.a(xf86cmap.c.o) + _CMapChangeGamma in libxorg_common.a(xf86cmap.c.o) + ... + ld: symbol(s) not found for architecture x86_64 + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit 6645ff59069d603806d749e8af73893cf88d2c06) + +commit 3868f364728ae0cc35621bbfdd36bfa2e3f09fda +Author: Jeremy Huddleston Sequoia +Date: Mon Jun 20 20:05:46 2022 -0700 + + xf86-input-inputtest: Fix build on systems without SOCK_NONBLOCK + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit 707f23dab8787b4154011186206dc9964e2ebc11) + +commit afcaaac96767d773422512e755e5ad3691a0627c +Author: Jeremy Huddleston Sequoia +Date: Mon Jun 20 19:51:39 2022 -0700 + + print_edid: Fix a format string error + + ../hw/xfree86/ddc/print_edid.c:511:20: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat] + det_mon->type - DS_VENDOR); + ^~~~~~~~~~~~~~~~~~~~~~~~~ + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit 199b8c0853c92ce19a589186f326621477401b74) + +commit 6bb98fc62ddf8b0dd90f7b0b45978a0d0425ed5a +Author: Jeremy Huddleston Sequoia +Date: Tue Jun 21 11:46:14 2022 -0700 + + xquartz: Update autotools-based builds of XQuartz to account for recent changes + + Signed-off-by: Jeremy Huddleston Sequoia + +commit 4ea6f661edbbd84b3f2b308675bd2aa848b53746 +Author: Jeremy Huddleston Sequoia +Date: Mon Jun 20 20:32:26 2022 -0700 + + Revert "meson: Bump requirement to meson-0.50.0" + + This bump is causing issues with our CI. Sorry about that. + + This reverts commit a6a20a7c40f86b5586286aaa614e6b64a5987d82 + + (cherry picked from commit 8cd0397e5b4c1f0e0add1fea67f82b811214bf3e) + +commit a6a20a7c40f86b5586286aaa614e6b64a5987d82 +Author: Jeremy Huddleston Sequoia +Date: Sun Jun 19 23:06:40 2022 -0700 + + meson: Provide options to set CFBundleVersion and CFBundleVersionString in XQuartz + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit 4f5999826aa478ba5f138e74cfccdf3b854c8e54) + +commit 37285e6252ce3afca5bc205121f83271548dfca9 +Author: Jeremy Huddleston Sequoia +Date: Sun Jun 19 19:56:26 2022 -0700 + + xquartz: Update copyright for 2022 + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit b12f5dc62d964d0279e1fa9403259cfd8e491285) + +commit 96e7b55c5d6898a6715b62d5e01581617d218997 +Author: Jeremy Huddleston Sequoia +Date: Sun Jun 19 19:55:44 2022 -0700 + + xquartz: Update Sparkle configuration to use SUPublicEDKey + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit 1d90bef30c4dfe13dd5e70fea606a02380cbcee6) + +commit 6465263be8ae98283f8e99a3e95d04e786386040 +Author: Jeremy Huddleston Sequoia +Date: Sun Jun 19 22:18:16 2022 -0700 + + meson: Bump requirement to meson-0.50.0 + + WARNING: Project specifies a minimum meson_version '>= 0.47.0' but uses features which were added in newer versions: + * 0.50.0: {'install arg in configure_file'} + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit 0a27f96d1d0e474b308be982fa7069d3ae0d9892) + +commit e48acd9c40c09b7c66a7bfc6650afc216ba78cca +Author: Jeremy Huddleston Sequoia +Date: Thu Jun 16 00:10:26 2022 -0700 + + XQuartz: Ensure scroll events are delivered to a single window (not both X11 and AppKit) + + Fixes: https://github.com/XQuartz/XQuartz/issues/130 + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit 4532b696c644cb7f21e96cf76d3e6b21ccc0e309) + +commit 140d9a0f75194d4079d5cd1e4ad4683c6f47683e +Author: Jeremy Huddleston Sequoia +Date: Sat Feb 20 14:21:01 2021 -0800 + + xquartz: Fold spaces related preferences into NSUserDefaults+XQuartzDefaults + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit f40610e0b4f2b4ae54ef6bbff756cb4a60e17e3b) + +commit 03ec5b132f0b3e07f9340faaacaa2455717fd8d1 +Author: Jeremy Huddleston Sequoia +Date: Sat Feb 20 14:00:14 2021 -0800 + + xquartz pbproxy: Adopt NSUserDefaults+XQuartzDefaults for preferences + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit 6134c73aebc3f928639e8f802be49ec8ecc17e66) + +commit 6df6178bb917f596ec2f61a3aabf99eea620b6ec +Author: Jeremy Huddleston Sequoia +Date: Fri Feb 19 22:49:11 2021 -0800 + + xquartz: Create a separate category for organizing user preferences + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit 963ba6d9adf578ec8d7ed12ae22dece76b895172) + +commit c6c1cba397ffa203123a8a6690dee728089e7325 +Author: Jeremy Huddleston Sequoia +Date: Sat Sep 10 22:32:56 2016 -0700 + + os/connection: Improve abstraction for launchd secure sockets + + This changes away from hard-coding the /tmp/launch-* path to now + supporting a generic [.] + format for $DISPLAY. + + cf-libxcb: d978a4f69b30b630f28d07f1003cf290284d24d8 + + Signed-off-by: Jeremy Huddleston Sequoia + CC: Adam Jackson + (cherry picked from commit 83d0d911069d502232d719882cd1c5cd090defa1) + +commit 663af2f17eec2cc064f3d1e25e00fb840c441964 +Author: Jeremy Huddleston Sequoia +Date: Sun Jun 12 22:06:01 2022 -0700 + + X11Application: Ensure TIS operations are done on the main thread + + Fixes: https://github.com/XQuartz/XQuartz/issues/205 + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit b1afcecc61d841f95e786e4f4f84184f91d149f1) + +commit bd3564cf377deace41b359740331d84e3086e916 +Author: Jeremy Huddleston Sequoia +Date: Fri Apr 23 02:15:30 2021 -0700 + + rootless: Dead code removal (ROOTLESS_REDISPLAY_DELAY is already defined) + + Signed-off-by: Jeremy Huddleston Sequoia + (cherry picked from commit c11b55f3c0c64645bca964aece825de0bdd92b1f) + +commit 53173fdab492f0f638f6616fcf01af0b9ea6338d +Author: Olivier Fourdan +Date: Thu Jan 20 10:20:38 2022 +0100 + + render: Fix build with gcc 12 + + The xserver fails to compile with the latest gcc 12: + + render/picture.c: In function ‘CreateSolidPicture’: + render/picture.c:874:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[16]’ [-Werror=array-bounds] + 874 | pPicture->pSourcePict->type = SourcePictTypeSolidFill; + | ^~ + render/picture.c:868:45: note: object of size 16 allocated by ‘malloc’ + 868 | pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictSolidFill)); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + render/picture.c: In function ‘CreateLinearGradientPicture’: + render/picture.c:906:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[32]’ [-Werror=array-bounds] + 906 | pPicture->pSourcePict->linear.type = SourcePictTypeLinear; + | ^~ + render/picture.c:899:45: note: object of size 32 allocated by ‘malloc’ + 899 | pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictLinearGradient)); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + render/picture.c: In function ‘CreateConicalGradientPicture’: + render/picture.c:989:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[32]’ [-Werror=array-bounds] + 989 | pPicture->pSourcePict->conical.type = SourcePictTypeConical; + | ^~ + render/picture.c:982:45: note: object of size 32 allocated by ‘malloc’ + 982 | pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictConicalGradient)); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + cc1: some warnings being treated as errors + ninja: build stopped: subcommand failed. + + This is because gcc 12 has become stricter and raises a warning now. + + Fix the warning/error by allocating enough memory to store the union + struct. + + Signed-off-by: Olivier Fourdan + Acked-by: Michel Dänzer + Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1256 + (cherry picked from commit c6b0dcb82d4db07a2f32c09a8c09c85a5f57248e) + +commit 69774044716039fa70655b3bc6dd6a4ff4535cfd +Author: Błażej Szczygieł +Date: Thu Jan 13 00:47:27 2022 +0100 + + present: Check for NULL to prevent crash + + Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1275 + Signed-off-by: Błażej Szczygieł + Tested-by: Aaron Plattner + (cherry picked from commit 22d5818851967408bb7c903cb345b7ca8766094c) + commit 85397cc2efe8fa73461cd21afe700829b2eca768 Author: Povilas Kanapickas Date: Mon Jan 3 00:23:30 2022 +0200 diff -Nru xorg-server-21.1.3/Makefile.in xorg-server-21.1.4/Makefile.in --- xorg-server-21.1.3/Makefile.in 2022-01-02 22:42:09.000000000 +0000 +++ xorg-server-21.1.4/Makefile.in 2022-07-12 13:28:09.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -237,6 +237,8 @@ DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz GZIP_ENV = --best DIST_TARGETS = dist-xz dist-gzip +# Exists only to be overridden by the user if desired. +AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -967,6 +969,10 @@ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -1009,6 +1015,8 @@ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -1025,7 +1033,7 @@ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ @@ -1191,7 +1199,7 @@ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \ - dist-tarZ dist-xz dist-zip distcheck distclean \ + dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \ distclean-generic distclean-libtool distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-aclocalDATA install-am \ diff -Nru xorg-server-21.1.3/Xext/Makefile.in xorg-server-21.1.4/Xext/Makefile.in --- xorg-server-21.1.3/Xext/Makefile.in 2022-01-02 22:42:09.000000000 +0000 +++ xorg-server-21.1.4/Xext/Makefile.in 2022-07-12 13:28:09.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/Xi/Makefile.in xorg-server-21.1.4/Xi/Makefile.in --- xorg-server-21.1.3/Xi/Makefile.in 2022-01-02 22:42:09.000000000 +0000 +++ xorg-server-21.1.4/Xi/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/Xi/exevents.c xorg-server-21.1.4/Xi/exevents.c --- xorg-server-21.1.3/Xi/exevents.c 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/Xi/exevents.c 2022-07-12 13:27:57.000000000 +0000 @@ -1524,7 +1524,7 @@ g = AllocGrab(devgrab); BUG_WARN(!g); - *dev->deviceGrab.sync.event = *ev; + CopyPartialInternalEvent(dev->deviceGrab.sync.event, ev); /* The listener array has a sequence of grabs and then one event * selection. Implicit grab activation occurs through delivering an diff -Nru xorg-server-21.1.3/aclocal.m4 xorg-server-21.1.4/aclocal.m4 --- xorg-server-21.1.3/aclocal.m4 2022-01-02 22:42:06.000000000 +0000 +++ xorg-server-21.1.4/aclocal.m4 2022-07-12 13:28:07.000000000 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.3 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -2835,7 +2835,7 @@ ]) # XTRANS_SECURE_RPC_FLAGS -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -2850,7 +2850,7 @@ [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.1], [], +m4_if([$1], [1.16.3], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -2866,14 +2866,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.1])dnl +[AM_AUTOMAKE_VERSION([1.16.3])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Figure out how to run the assembler. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -2893,7 +2893,7 @@ # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -2945,7 +2945,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -2976,7 +2976,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -3167,7 +3167,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -3206,7 +3206,9 @@ done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi @@ -3233,7 +3235,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -3430,7 +3432,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -3451,7 +3453,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -3472,7 +3474,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -3515,7 +3517,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -3536,12 +3538,7 @@ [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -3554,7 +3551,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -3583,7 +3580,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -3630,7 +3627,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -3649,7 +3646,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -3730,7 +3727,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -3790,7 +3787,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -3818,7 +3815,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -3837,7 +3834,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2018 Free Software Foundation, Inc. +# Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/compile xorg-server-21.1.4/compile --- xorg-server-21.1.3/compile 2022-01-02 22:42:09.000000000 +0000 +++ xorg-server-21.1.4/compile 2022-07-12 13:28:09.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -53,7 +53,7 @@ MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) diff -Nru xorg-server-21.1.3/composite/Makefile.in xorg-server-21.1.4/composite/Makefile.in --- xorg-server-21.1.3/composite/Makefile.in 2022-01-02 22:42:09.000000000 +0000 +++ xorg-server-21.1.4/composite/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/config/Makefile.in xorg-server-21.1.4/config/Makefile.in --- xorg-server-21.1.3/config/Makefile.in 2022-01-02 22:42:09.000000000 +0000 +++ xorg-server-21.1.4/config/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/configure xorg-server-21.1.4/configure --- xorg-server-21.1.3/configure 2022-01-02 22:42:07.000000000 +0000 +++ xorg-server-21.1.4/configure 2022-07-12 13:28:08.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for xorg-server 21.1.3. +# Generated by GNU Autoconf 2.69 for xorg-server 21.1.4. # # Report bugs to . # @@ -651,8 +651,8 @@ # Identity of this package. PACKAGE_NAME='xorg-server' PACKAGE_TARNAME='xorg-server' -PACKAGE_VERSION='21.1.3' -PACKAGE_STRING='xorg-server 21.1.3' +PACKAGE_VERSION='21.1.4' +PACKAGE_STRING='xorg-server 21.1.4' PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/xserver/issues' PACKAGE_URL='' @@ -1971,7 +1971,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xorg-server 21.1.3 to adapt to many kinds of systems. +\`configure' configures xorg-server 21.1.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -2042,7 +2042,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xorg-server 21.1.3:";; + short | recursive ) echo "Configuration of xorg-server 21.1.4:";; esac cat <<\_ACEOF @@ -2227,10 +2227,10 @@ org.x) --with-bundle-version=VERSION Version to use for X11.app's CFBundleVersion - (default: 21.1.3) + (default: 21.1.4) --with-bundle-version-string=VERSION Version to use for X11.app's - CFBundleShortVersionString (default: 21.1.3) + CFBundleShortVersionString (default: 21.1.4) --with-sparkle-feed-url=URL URL for the Sparkle feed (default: https://www.xquartz.org/releases/sparkle/release.xml) @@ -2443,7 +2443,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xorg-server configure 21.1.3 +xorg-server configure 21.1.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -3152,7 +3152,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xorg-server $as_me 21.1.3, which was +It was created by xorg-server $as_me 21.1.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3500,7 +3500,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -RELEASE_DATE="2022-01-02" +RELEASE_DATE="2022-07-12" RELEASE_NAME="Caramel Ice Cream" @@ -3709,12 +3709,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -4019,7 +4014,7 @@ # Define the identity of the package. PACKAGE='xorg-server' - VERSION='21.1.3' + VERSION='21.1.4' cat >>confdefs.h <<_ACEOF @@ -16337,11 +16332,11 @@ # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + 10.0,*86*-darwin8*|10.0,*-darwin[912]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) + 10.*|11.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; @@ -23526,7 +23521,7 @@ if test "${with_bundle_version+set}" = set; then : withval=$with_bundle_version; BUNDLE_VERSION="${withval}" else - BUNDLE_VERSION="21.1.3" + BUNDLE_VERSION="21.1.4" fi @@ -32078,7 +32073,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xorg-server $as_me 21.1.3, which was +This file was extended by xorg-server $as_me 21.1.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -32144,7 +32139,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -xorg-server config.status 21.1.3 +xorg-server config.status 21.1.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -33339,7 +33334,9 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } diff -Nru xorg-server-21.1.3/configure.ac xorg-server-21.1.4/configure.ac --- xorg-server-21.1.3/configure.ac 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/configure.ac 2022-07-12 13:27:57.000000000 +0000 @@ -26,8 +26,8 @@ dnl Process this file with autoconf to create configure. AC_PREREQ(2.60) -AC_INIT([xorg-server], 21.1.3, [https://gitlab.freedesktop.org/xorg/xserver/issues], xorg-server) -RELEASE_DATE="2022-01-02" +AC_INIT([xorg-server], 21.1.4, [https://gitlab.freedesktop.org/xorg/xserver/issues], xorg-server) +RELEASE_DATE="2022-07-12" RELEASE_NAME="Caramel Ice Cream" AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_MACRO_DIR([m4]) diff -Nru xorg-server-21.1.3/damageext/Makefile.in xorg-server-21.1.4/damageext/Makefile.in --- xorg-server-21.1.3/damageext/Makefile.in 2022-01-02 22:42:09.000000000 +0000 +++ xorg-server-21.1.4/damageext/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/dbe/Makefile.in xorg-server-21.1.4/dbe/Makefile.in --- xorg-server-21.1.3/dbe/Makefile.in 2022-01-02 22:42:09.000000000 +0000 +++ xorg-server-21.1.4/dbe/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/debian/changelog xorg-server-21.1.4/debian/changelog --- xorg-server-21.1.3/debian/changelog 2023-10-25 12:07:28.000000000 +0000 +++ xorg-server-21.1.4/debian/changelog 2023-10-25 12:07:29.000000000 +0000 @@ -1,35 +1,56 @@ -xorg-server (2:21.1.3-2ubuntu2.9) jammy-security; urgency=medium +xorg-server (2:21.1.4-2ubuntu1.7~22.04.2) jammy-security; urgency=medium + + * SECURITY UPDATE: OOB write in XIChangeDeviceProperty and + RRChangeOutputProperty + - debian/patches/CVE-2023-5367.patch: fix handling of PropModeAppend + and PropModePrepend in Xi/xiproperty.c, randr/rrproperty.c. + - CVE-2023-5367 + * SECURITY UPDATE: Use-after-free bug in DestroyWindow + - debian/patches/CVE-2023-5380.patch: reset the PointerWindows + reference on screen switch in dix/enterleave.h, include/eventstr.h, + mi/mipointer.c. + - CVE-2023-5380 + + -- Marc Deslauriers Mon, 23 Oct 2023 12:30:42 -0400 + +xorg-server (2:21.1.4-2ubuntu1.7~22.04.1) jammy; urgency=medium + + * Backport to jammy. (LP: #2009767) + + -- Timo Aaltonen Tue, 04 Apr 2023 09:20:09 +0300 + +xorg-server (2:21.1.4-2ubuntu1.7) kinetic-security; urgency=medium * SECURITY UPDATE: Overlay Window Use-After-Free - debian/patches/CVE-2023-1393.patch: fix use-after-free of the COW in composite/compwindow.c. - CVE-2023-1393 - -- Marc Deslauriers Wed, 29 Mar 2023 08:52:16 -0400 + -- Marc Deslauriers Wed, 29 Mar 2023 08:50:21 -0400 -xorg-server (2:21.1.3-2ubuntu2.8) jammy; urgency=medium +xorg-server (2:21.1.4-2ubuntu1.6) kinetic; urgency=medium * patches: Force update LEDs after device state update. (LP: #1993621) - -- Timo Aaltonen Tue, 21 Feb 2023 18:01:37 +0200 + -- Timo Aaltonen Tue, 21 Feb 2023 17:17:27 +0200 -xorg-server (2:21.1.3-2ubuntu2.7) jammy-security; urgency=medium +xorg-server (2:21.1.4-2ubuntu1.5) kinetic-security; urgency=medium * SECURITY UPDATE: DeepCopyPointerClasses use-after-free - debian/patches/CVE-2023-0494.patch: fix potential use-after-free in Xi/exevents.c. - CVE-2023-0494 - -- Marc Deslauriers Tue, 07 Feb 2023 07:47:22 -0500 + -- Marc Deslauriers Tue, 07 Feb 2023 07:44:59 -0500 -xorg-server (2:21.1.3-2ubuntu2.6) jammy; urgency=medium +xorg-server (2:21.1.4-2ubuntu1.4) kinetic; urgency=medium * re-calculate-the-clock-and-refresh-rate.diff: Import v3, fix a crash. (LP: #1999008) - -- Timo Aaltonen Wed, 07 Dec 2022 11:32:56 +0200 + -- Timo Aaltonen Wed, 07 Dec 2022 11:28:20 +0200 -xorg-server (2:21.1.3-2ubuntu2.5) jammy-security; urgency=medium +xorg-server (2:21.1.4-2ubuntu1.3) kinetic-security; urgency=medium * SECURITY UPDATE: XTestSwapFakeInput stack overflow - debian/patches/CVE-2022-46340.patch: disallow GenericEvents in @@ -58,19 +79,16 @@ NULL after freeing it in xkb/xkbUtils.c. - CVE-2022-4283 - -- Marc Deslauriers Wed, 07 Dec 2022 07:56:57 -0500 + -- Marc Deslauriers Wed, 07 Dec 2022 07:49:40 -0500 -xorg-server (2:21.1.3-2ubuntu2.4) jammy; urgency=medium +xorg-server (2:21.1.4-2ubuntu1.2) kinetic; urgency=medium - * patches: Remove some merge cruft. * re-calculate-the-clock-and-refresh-rate.diff: Fix modes on 2.5k@90Hz panels. (LP: #1996490) - * patches: Don't send touch end to clients that do async grab without - touches. (LP: #1994027) - -- Timo Aaltonen Thu, 24 Nov 2022 14:21:14 +0200 + -- Timo Aaltonen Fri, 25 Nov 2022 13:59:07 +0200 -xorg-server (2:21.1.3-2ubuntu2.3) jammy-security; urgency=medium +xorg-server (2:21.1.4-2ubuntu1.1) kinetic-security; urgency=medium * SECURITY UPDATE: GetCountedString Buffer Overflow - debian/patches/CVE-2022-3550.patch: add a check for client->req_len @@ -82,16 +100,30 @@ in xkb/xkb.c. - CVE-2022-3551 - -- Rodrigo Figueiredo Zaiden Tue, 22 Nov 2022 16:22:28 -0300 + -- Rodrigo Figueiredo Zaiden Tue, 22 Nov 2022 16:28:31 -0300 + +xorg-server (2:21.1.4-2ubuntu1) kinetic; urgency=medium + + * Merge from Debian. + * Drop CVE patches, upstream. + + -- Timo Aaltonen Wed, 14 Sep 2022 12:59:30 +0300 + +xorg-server (2:21.1.4-2) unstable; urgency=medium + + * 001_fedora_extramodes.patch: Dropped, apparently obsolete since + 1.5.0. (LP: #1990456) + + -- Timo Aaltonen Thu, 22 Sep 2022 08:53:59 +0300 -xorg-server (2:21.1.3-2ubuntu2.2) jammy; urgency=medium +xorg-server (2:21.1.4-1) unstable; urgency=medium - * 001_fedora_extramodes.patch: Dropped, causes issues with NVIDIA and - is obsolete anyway. (LP: #1990456) + * New upstream release. + - CVE-2022-2319, CVE-2022-2320 (Closes: #1014903) - -- Timo Aaltonen Thu, 22 Sep 2022 17:26:58 +0300 + -- Timo Aaltonen Mon, 25 Jul 2022 12:46:43 +0300 -xorg-server (2:21.1.3-2ubuntu2.1) jammy-security; urgency=medium +xorg-server (2:21.1.3-2ubuntu3) kinetic; urgency=medium * SECURITY UPDATE: ProcXkbSetGeometry Out-Of-Bounds Access - debian/patches/CVE-2022-2319-pre1.patch: switch to array index loops diff -Nru xorg-server-21.1.3/debian/patches/CVE-2022-2319-pre1.patch xorg-server-21.1.4/debian/patches/CVE-2022-2319-pre1.patch --- xorg-server-21.1.3/debian/patches/CVE-2022-2319-pre1.patch 2023-10-25 12:07:28.000000000 +0000 +++ xorg-server-21.1.4/debian/patches/CVE-2022-2319-pre1.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,70 +0,0 @@ -From de1e70e6d179361291312d2c2effb246eedbdd88 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 5 Jul 2022 12:40:47 +1000 -Subject: [PATCH] xkb: switch to array index loops to moving pointers - -Most similar loops here use a pointer that advances with each loop -iteration, let's do the same here for consistency. - -No functional changes. - -Signed-off-by: Peter Hutterer -Reviewed-by: Olivier Fourdan ---- - xkb/xkb.c | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) - ---- a/xkb/xkb.c -+++ b/xkb/xkb.c -@@ -5369,16 +5369,16 @@ _CheckSetSections(XkbGeometryPtr geom, - row->left = rWire->left; - row->vertical = rWire->vertical; - kWire = (xkbKeyWireDesc *) &rWire[1]; -- for (k = 0; k < rWire->nKeys; k++) { -+ for (k = 0; k < rWire->nKeys; k++, kWire++) { - XkbKeyPtr key; - - key = XkbAddGeomKey(row); - if (!key) - return BadAlloc; -- memcpy(key->name.name, kWire[k].name, XkbKeyNameLength); -- key->gap = kWire[k].gap; -- key->shape_ndx = kWire[k].shapeNdx; -- key->color_ndx = kWire[k].colorNdx; -+ memcpy(key->name.name, kWire->name, XkbKeyNameLength); -+ key->gap = kWire->gap; -+ key->shape_ndx = kWire->shapeNdx; -+ key->color_ndx = kWire->colorNdx; - if (key->shape_ndx >= geom->num_shapes) { - client->errorValue = _XkbErrCode3(0x10, key->shape_ndx, - geom->num_shapes); -@@ -5390,7 +5390,7 @@ _CheckSetSections(XkbGeometryPtr geom, - return BadMatch; - } - } -- rWire = (xkbRowWireDesc *) &kWire[rWire->nKeys]; -+ rWire = (xkbRowWireDesc *)kWire; - } - wire = (char *) rWire; - if (sWire->nDoodads > 0) { -@@ -5455,16 +5455,16 @@ _CheckSetShapes(XkbGeometryPtr geom, - return BadAlloc; - ol->corner_radius = olWire->cornerRadius; - ptWire = (xkbPointWireDesc *) &olWire[1]; -- for (p = 0, pt = ol->points; p < olWire->nPoints; p++, pt++) { -- pt->x = ptWire[p].x; -- pt->y = ptWire[p].y; -+ for (p = 0, pt = ol->points; p < olWire->nPoints; p++, pt++, ptWire++) { -+ pt->x = ptWire->x; -+ pt->y = ptWire->y; - if (client->swapped) { - swaps(&pt->x); - swaps(&pt->y); - } - } - ol->num_points = olWire->nPoints; -- olWire = (xkbOutlineWireDesc *) (&ptWire[olWire->nPoints]); -+ olWire = (xkbOutlineWireDesc *)ptWire; - } - if (shapeWire->primaryNdx != XkbNoShape) - shape->primary = &shape->outlines[shapeWire->primaryNdx]; diff -Nru xorg-server-21.1.3/debian/patches/CVE-2022-2319.patch xorg-server-21.1.4/debian/patches/CVE-2022-2319.patch --- xorg-server-21.1.3/debian/patches/CVE-2022-2319.patch 2023-10-25 12:07:28.000000000 +0000 +++ xorg-server-21.1.4/debian/patches/CVE-2022-2319.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,176 +0,0 @@ -From 1ff4ec6c6cc3d5acf47ee95ef1c5fb0b91d5cb08 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 5 Jul 2022 11:11:06 +1000 -Subject: [PATCH xserver] xkb: add request length validation for XkbSetGeometry - -No validation of the various fields on that report were done, so a -malicious client could send a short request that claims it had N -sections, or rows, or keys, and the server would process the request for -N sections, running out of bounds of the actual request data. - -Fix this by adding size checks to ensure our data is valid. - -ZDI-CAN 16062 - -This vulnerability was discovered by: -Jan-Niklas Sohn working with Trend Micro Zero Day Initiative - -Signed-off-by: Peter Hutterer ---- - xkb/xkb.c | 43 ++++++++++++++++++++++++++++++++++++++----- - 1 file changed, 38 insertions(+), 5 deletions(-) - ---- a/xkb/xkb.c -+++ b/xkb/xkb.c -@@ -5157,7 +5157,7 @@ _GetCountedString(char **wire_inout, Cli - } - - static Status --_CheckSetDoodad(char **wire_inout, -+_CheckSetDoodad(char **wire_inout, xkbSetGeometryReq *req, - XkbGeometryPtr geom, XkbSectionPtr section, ClientPtr client) - { - char *wire; -@@ -5168,6 +5168,9 @@ _CheckSetDoodad(char **wire_inout, - Status status; - - dWire = (xkbDoodadWireDesc *) (*wire_inout); -+ if (!_XkbCheckRequestBounds(client, req, dWire, dWire + 1)) -+ return BadLength; -+ - any = dWire->any; - wire = (char *) &dWire[1]; - if (client->swapped) { -@@ -5270,7 +5273,7 @@ _CheckSetDoodad(char **wire_inout, - } - - static Status --_CheckSetOverlay(char **wire_inout, -+_CheckSetOverlay(char **wire_inout, xkbSetGeometryReq *req, - XkbGeometryPtr geom, XkbSectionPtr section, ClientPtr client) - { - register int r; -@@ -5281,6 +5284,9 @@ _CheckSetOverlay(char **wire_inout, - - wire = *wire_inout; - olWire = (xkbOverlayWireDesc *) wire; -+ if (!_XkbCheckRequestBounds(client, req, olWire, olWire + 1)) -+ return BadLength; -+ - if (client->swapped) { - swapl(&olWire->name); - } -@@ -5292,6 +5298,9 @@ _CheckSetOverlay(char **wire_inout, - xkbOverlayKeyWireDesc *kWire; - XkbOverlayRowPtr row; - -+ if (!_XkbCheckRequestBounds(client, req, rWire, rWire + 1)) -+ return BadLength; -+ - if (rWire->rowUnder > section->num_rows) { - client->errorValue = _XkbErrCode4(0x20, r, section->num_rows, - rWire->rowUnder); -@@ -5300,6 +5309,9 @@ _CheckSetOverlay(char **wire_inout, - row = XkbAddGeomOverlayRow(ol, rWire->rowUnder, rWire->nKeys); - kWire = (xkbOverlayKeyWireDesc *) &rWire[1]; - for (k = 0; k < rWire->nKeys; k++, kWire++) { -+ if (!_XkbCheckRequestBounds(client, req, kWire, kWire + 1)) -+ return BadLength; -+ - if (XkbAddGeomOverlayKey(ol, row, - (char *) kWire->over, - (char *) kWire->under) == NULL) { -@@ -5333,6 +5345,9 @@ _CheckSetSections(XkbGeometryPtr geom, - register int r; - xkbRowWireDesc *rWire; - -+ if (!_XkbCheckRequestBounds(client, req, sWire, sWire + 1)) -+ return BadLength; -+ - if (client->swapped) { - swapl(&sWire->name); - swaps(&sWire->top); -@@ -5358,6 +5373,9 @@ _CheckSetSections(XkbGeometryPtr geom, - XkbRowPtr row; - xkbKeyWireDesc *kWire; - -+ if (!_XkbCheckRequestBounds(client, req, rWire, rWire + 1)) -+ return BadLength; -+ - if (client->swapped) { - swaps(&rWire->top); - swaps(&rWire->left); -@@ -5372,6 +5390,9 @@ _CheckSetSections(XkbGeometryPtr geom, - for (k = 0; k < rWire->nKeys; k++, kWire++) { - XkbKeyPtr key; - -+ if (!_XkbCheckRequestBounds(client, req, kWire, kWire + 1)) -+ return BadLength; -+ - key = XkbAddGeomKey(row); - if (!key) - return BadAlloc; -@@ -5397,7 +5418,7 @@ _CheckSetSections(XkbGeometryPtr geom, - register int d; - - for (d = 0; d < sWire->nDoodads; d++) { -- status = _CheckSetDoodad(&wire, geom, section, client); -+ status = _CheckSetDoodad(&wire, req, geom, section, client); - if (status != Success) - return status; - } -@@ -5406,7 +5427,7 @@ _CheckSetSections(XkbGeometryPtr geom, - register int o; - - for (o = 0; o < sWire->nOverlays; o++) { -- status = _CheckSetOverlay(&wire, geom, section, client); -+ status = _CheckSetOverlay(&wire, req, geom, section, client); - if (status != Success) - return status; - } -@@ -5440,6 +5461,9 @@ _CheckSetShapes(XkbGeometryPtr geom, - xkbOutlineWireDesc *olWire; - XkbOutlinePtr ol; - -+ if (!_XkbCheckRequestBounds(client, req, shapeWire, shapeWire + 1)) -+ return BadLength; -+ - shape = - XkbAddGeomShape(geom, shapeWire->name, shapeWire->nOutlines); - if (!shape) -@@ -5450,12 +5474,18 @@ _CheckSetShapes(XkbGeometryPtr geom, - XkbPointPtr pt; - xkbPointWireDesc *ptWire; - -+ if (!_XkbCheckRequestBounds(client, req, olWire, olWire + 1)) -+ return BadLength; -+ - ol = XkbAddGeomOutline(shape, olWire->nPoints); - if (!ol) - return BadAlloc; - ol->corner_radius = olWire->cornerRadius; - ptWire = (xkbPointWireDesc *) &olWire[1]; - for (p = 0, pt = ol->points; p < olWire->nPoints; p++, pt++, ptWire++) { -+ if (!_XkbCheckRequestBounds(client, req, ptWire, ptWire + 1)) -+ return BadLength; -+ - pt->x = ptWire->x; - pt->y = ptWire->y; - if (client->swapped) { -@@ -5561,12 +5591,15 @@ _CheckSetGeom(XkbGeometryPtr geom, xkbSe - return status; - - for (i = 0; i < req->nDoodads; i++) { -- status = _CheckSetDoodad(&wire, geom, NULL, client); -+ status = _CheckSetDoodad(&wire, req, geom, NULL, client); - if (status != Success) - return status; - } - - for (i = 0; i < req->nKeyAliases; i++) { -+ if (!_XkbCheckRequestBounds(client, req, wire, wire + XkbKeyNameLength)) -+ return BadLength; -+ - if (XkbAddGeomKeyAlias(geom, &wire[XkbKeyNameLength], wire) == NULL) - return BadAlloc; - wire += 2 * XkbKeyNameLength; diff -Nru xorg-server-21.1.3/debian/patches/CVE-2022-2320.patch xorg-server-21.1.4/debian/patches/CVE-2022-2320.patch --- xorg-server-21.1.3/debian/patches/CVE-2022-2320.patch 2023-10-25 12:07:28.000000000 +0000 +++ xorg-server-21.1.4/debian/patches/CVE-2022-2320.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,173 +0,0 @@ -From 4e597615d43a1946942c8a004f9b9079b12e3b8a Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 5 Jul 2022 09:50:41 +1000 -Subject: [PATCH xserver] xkb: swap XkbSetDeviceInfo and XkbSetDeviceInfoCheck - -XKB often uses a FooCheck and Foo function pair, the former is supposed -to check all values in the request and error out on BadLength, -BadValue, etc. The latter is then called once we're confident the values -are good (they may still fail on an individual device, but that's a -different topic). - -In the case of XkbSetDeviceInfo, those functions were incorrectly -named, with XkbSetDeviceInfo ending up as the checker function and -XkbSetDeviceInfoCheck as the setter function. As a result, the setter -function was called before the checker function, accessing request -data and modifying device state before we ensured that the data is -valid. - -In particular, the setter function relied on values being already -byte-swapped. This in turn could lead to potential OOB memory access. - -Fix this by correctly naming the functions and moving the length checks -over to the checker function. These were added in 87c64fc5b0 to the -wrong function, probably due to the incorrect naming. - -Fixes ZDI-CAN 16070 - -This vulnerability was discovered by: -Jan-Niklas Sohn working with Trend Micro Zero Day Initiative - -Introduced in c06e27b2f6fd9f7b9f827623a48876a225264132 - -Signed-off-by: Peter Hutterer ---- - xkb/xkb.c | 46 +++++++++++++++++++++++++--------------------- - 1 file changed, 25 insertions(+), 21 deletions(-) - ---- a/xkb/xkb.c -+++ b/xkb/xkb.c -@@ -6584,7 +6584,8 @@ ProcXkbGetDeviceInfo(ClientPtr client) - static char * - CheckSetDeviceIndicators(char *wire, - DeviceIntPtr dev, -- int num, int *status_rtrn, ClientPtr client) -+ int num, int *status_rtrn, ClientPtr client, -+ xkbSetDeviceInfoReq * stuff) - { - xkbDeviceLedsWireDesc *ledWire; - int i; -@@ -6592,6 +6593,11 @@ CheckSetDeviceIndicators(char *wire, - - ledWire = (xkbDeviceLedsWireDesc *) wire; - for (i = 0; i < num; i++) { -+ if (!_XkbCheckRequestBounds(client, stuff, ledWire, ledWire + 1)) { -+ *status_rtrn = BadLength; -+ return (char *) ledWire; -+ } -+ - if (client->swapped) { - swaps(&ledWire->ledClass); - swaps(&ledWire->ledID); -@@ -6619,6 +6625,11 @@ CheckSetDeviceIndicators(char *wire, - atomWire = (CARD32 *) &ledWire[1]; - if (nNames > 0) { - for (n = 0; n < nNames; n++) { -+ if (!_XkbCheckRequestBounds(client, stuff, atomWire, atomWire + 1)) { -+ *status_rtrn = BadLength; -+ return (char *) atomWire; -+ } -+ - if (client->swapped) { - swapl(atomWire); - } -@@ -6630,6 +6641,10 @@ CheckSetDeviceIndicators(char *wire, - mapWire = (xkbIndicatorMapWireDesc *) atomWire; - if (nMaps > 0) { - for (n = 0; n < nMaps; n++) { -+ if (!_XkbCheckRequestBounds(client, stuff, mapWire, mapWire + 1)) { -+ *status_rtrn = BadLength; -+ return (char *) mapWire; -+ } - if (client->swapped) { - swaps(&mapWire->virtualMods); - swapl(&mapWire->ctrls); -@@ -6681,11 +6696,6 @@ SetDeviceIndicators(char *wire, - xkbIndicatorMapWireDesc *mapWire; - XkbSrvLedInfoPtr sli; - -- if (!_XkbCheckRequestBounds(client, stuff, ledWire, ledWire + 1)) { -- *status_rtrn = BadLength; -- return (char *) ledWire; -- } -- - namec = mapc = statec = 0; - sli = XkbFindSrvLedInfo(dev, ledWire->ledClass, ledWire->ledID, - XkbXI_IndicatorMapsMask); -@@ -6704,10 +6714,6 @@ SetDeviceIndicators(char *wire, - memset((char *) sli->names, 0, XkbNumIndicators * sizeof(Atom)); - for (n = 0, bit = 1; n < XkbNumIndicators; n++, bit <<= 1) { - if (ledWire->namesPresent & bit) { -- if (!_XkbCheckRequestBounds(client, stuff, atomWire, atomWire + 1)) { -- *status_rtrn = BadLength; -- return (char *) atomWire; -- } - sli->names[n] = (Atom) *atomWire; - if (sli->names[n] == None) - ledWire->namesPresent &= ~bit; -@@ -6725,10 +6731,6 @@ SetDeviceIndicators(char *wire, - if (ledWire->mapsPresent) { - for (n = 0, bit = 1; n < XkbNumIndicators; n++, bit <<= 1) { - if (ledWire->mapsPresent & bit) { -- if (!_XkbCheckRequestBounds(client, stuff, mapWire, mapWire + 1)) { -- *status_rtrn = BadLength; -- return (char *) mapWire; -- } - sli->maps[n].flags = mapWire->flags; - sli->maps[n].which_groups = mapWire->whichGroups; - sli->maps[n].groups = mapWire->groups; -@@ -6764,13 +6766,17 @@ SetDeviceIndicators(char *wire, - } - - static int --_XkbSetDeviceInfo(ClientPtr client, DeviceIntPtr dev, -+_XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev, - xkbSetDeviceInfoReq * stuff) - { - char *wire; - - wire = (char *) &stuff[1]; - if (stuff->change & XkbXI_ButtonActionsMask) { -+ int sz = stuff->nBtns * SIZEOF(xkbActionWireDesc); -+ if (!_XkbCheckRequestBounds(client, stuff, wire, (char *) wire + sz)) -+ return BadLength; -+ - if (!dev->button) { - client->errorValue = _XkbErrCode2(XkbErr_BadClass, ButtonClass); - return XkbKeyboardErrorCode; -@@ -6781,13 +6787,13 @@ _XkbSetDeviceInfo(ClientPtr client, Devi - dev->button->numButtons); - return BadMatch; - } -- wire += (stuff->nBtns * SIZEOF(xkbActionWireDesc)); -+ wire += sz; - } - if (stuff->change & XkbXI_IndicatorsMask) { - int status = Success; - - wire = CheckSetDeviceIndicators(wire, dev, stuff->nDeviceLedFBs, -- &status, client); -+ &status, client, stuff); - if (status != Success) - return status; - } -@@ -6798,8 +6804,8 @@ _XkbSetDeviceInfo(ClientPtr client, Devi - } - - static int --_XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev, -- xkbSetDeviceInfoReq * stuff) -+_XkbSetDeviceInfo(ClientPtr client, DeviceIntPtr dev, -+ xkbSetDeviceInfoReq * stuff) - { - char *wire; - xkbExtensionDeviceNotify ed; -@@ -6823,8 +6829,6 @@ _XkbSetDeviceInfoCheck(ClientPtr client, - if (stuff->firstBtn + stuff->nBtns > nBtns) - return BadValue; - sz = stuff->nBtns * SIZEOF(xkbActionWireDesc); -- if (!_XkbCheckRequestBounds(client, stuff, wire, (char *) wire + sz)) -- return BadLength; - memcpy((char *) &acts[stuff->firstBtn], (char *) wire, sz); - wire += sz; - ed.reason |= XkbXI_ButtonActionsMask; diff -Nru xorg-server-21.1.3/debian/patches/CVE-2023-5367.patch xorg-server-21.1.4/debian/patches/CVE-2023-5367.patch --- xorg-server-21.1.3/debian/patches/CVE-2023-5367.patch 1970-01-01 00:00:00.000000000 +0000 +++ xorg-server-21.1.4/debian/patches/CVE-2023-5367.patch 2023-10-25 12:07:29.000000000 +0000 @@ -0,0 +1,80 @@ +From 69ceb12e9c9dc42175aba48bb86f2842423d7082 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Tue, 3 Oct 2023 11:53:05 +1000 +Subject: [PATCH xserver 1/4] Xi/randr: fix handling of PropModeAppend/Prepend + +The handling of appending/prepending properties was incorrect, with at +least two bugs: the property length was set to the length of the new +part only, i.e. appending or prepending N elements to a property with P +existing elements always resulted in the property having N elements +instead of N + P. + +Second, when pre-pending a value to a property, the offset for the old +values was incorrect, leaving the new property with potentially +uninitalized values and/or resulting in OOB memory writes. +For example, prepending a 3 element value to a 5 element property would +result in this 8 value array: + [N, N, N, ?, ?, P, P, P ] P, P + ^OOB write + +The XI2 code is a copy/paste of the RandR code, so the bug exists in +both. + +CVE-2023-5367, ZDI-CAN-22153 + +This vulnerability was discovered by: +Jan-Niklas Sohn working with Trend Micro Zero Day Initiative + +Signed-off-by: Peter Hutterer +--- + Xi/xiproperty.c | 4 ++-- + randr/rrproperty.c | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c +index 066ba21fba..d315f04d0e 100644 +--- a/Xi/xiproperty.c ++++ b/Xi/xiproperty.c +@@ -730,7 +730,7 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type, + XIDestroyDeviceProperty(prop); + return BadAlloc; + } +- new_value.size = len; ++ new_value.size = total_len; + new_value.type = type; + new_value.format = format; + +@@ -747,7 +747,7 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type, + case PropModePrepend: + new_data = new_value.data; + old_data = (void *) (((char *) new_value.data) + +- (prop_value->size * size_in_bytes)); ++ (len * size_in_bytes)); + break; + } + if (new_data) +diff --git a/randr/rrproperty.c b/randr/rrproperty.c +index c2fb9585c6..25469f57b2 100644 +--- a/randr/rrproperty.c ++++ b/randr/rrproperty.c +@@ -209,7 +209,7 @@ RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type, + RRDestroyOutputProperty(prop); + return BadAlloc; + } +- new_value.size = len; ++ new_value.size = total_len; + new_value.type = type; + new_value.format = format; + +@@ -226,7 +226,7 @@ RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type, + case PropModePrepend: + new_data = new_value.data; + old_data = (void *) (((char *) new_value.data) + +- (prop_value->size * size_in_bytes)); ++ (len * size_in_bytes)); + break; + } + if (new_data) +-- +2.41.0 + diff -Nru xorg-server-21.1.3/debian/patches/CVE-2023-5380.patch xorg-server-21.1.4/debian/patches/CVE-2023-5380.patch --- xorg-server-21.1.3/debian/patches/CVE-2023-5380.patch 1970-01-01 00:00:00.000000000 +0000 +++ xorg-server-21.1.4/debian/patches/CVE-2023-5380.patch 2023-10-25 12:07:29.000000000 +0000 @@ -0,0 +1,99 @@ +From 344bdc9b8075bc98ddad46439f04f17b8a681cc5 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Thu, 5 Oct 2023 12:19:45 +1000 +Subject: [PATCH xserver 2/4] mi: reset the PointerWindows reference on screen + switch + +PointerWindows[] keeps a reference to the last window our sprite +entered - changes are usually handled by CheckMotion(). + +If we switch between screens via XWarpPointer our +dev->spriteInfo->sprite->win is set to the new screen's root window. +If there's another window at the cursor location CheckMotion() will +trigger the right enter/leave events later. If there is not, it skips +that process and we never trigger LeaveWindow() - PointerWindows[] for +the device still refers to the previous window. + +If that window is destroyed we have a dangling reference that will +eventually cause a use-after-free bug when checking the window hierarchy +later. + +To trigger this, we require: +- two protocol screens +- XWarpPointer to the other screen's root window +- XDestroyWindow before entering any other window + +This is a niche bug so we hack around it by making sure we reset the +PointerWindows[] entry so we cannot have a dangling pointer. This +doesn't handle Enter/Leave events correctly but the previous code didn't +either. + +CVE-2023-5380, ZDI-CAN-21608 + +This vulnerability was discovered by: +Sri working with Trend Micro Zero Day Initiative + +Signed-off-by: Peter Hutterer +Reviewed-by: Adam Jackson +--- + dix/enterleave.h | 2 -- + include/eventstr.h | 3 +++ + mi/mipointer.c | 17 +++++++++++++++-- + 3 files changed, 18 insertions(+), 4 deletions(-) + +diff --git a/dix/enterleave.h b/dix/enterleave.h +index 4b833d8a3b..e8af924c68 100644 +--- a/dix/enterleave.h ++++ b/dix/enterleave.h +@@ -58,8 +58,6 @@ extern void DeviceFocusEvent(DeviceIntPtr dev, + + extern void EnterWindow(DeviceIntPtr dev, WindowPtr win, int mode); + +-extern void LeaveWindow(DeviceIntPtr dev); +- + extern void CoreFocusEvent(DeviceIntPtr kbd, + int type, int mode, int detail, WindowPtr pWin); + +diff --git a/include/eventstr.h b/include/eventstr.h +index 93308f9b24..a9926eaeef 100644 +--- a/include/eventstr.h ++++ b/include/eventstr.h +@@ -335,4 +335,7 @@ union _InternalEvent { + GestureEvent gesture_event; + }; + ++extern void ++LeaveWindow(DeviceIntPtr dev); ++ + #endif +diff --git a/mi/mipointer.c b/mi/mipointer.c +index a638f25d4a..8cf0035140 100644 +--- a/mi/mipointer.c ++++ b/mi/mipointer.c +@@ -397,8 +397,21 @@ miPointerWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) + #ifdef PANORAMIX + && noPanoramiXExtension + #endif +- ) +- UpdateSpriteForScreen(pDev, pScreen); ++ ) { ++ DeviceIntPtr master = GetMaster(pDev, MASTER_POINTER); ++ /* Hack for CVE-2023-5380: if we're moving ++ * screens PointerWindows[] keeps referring to the ++ * old window. If that gets destroyed we have a UAF ++ * bug later. Only happens when jumping from a window ++ * to the root window on the other screen. ++ * Enter/Leave events are incorrect for that case but ++ * too niche to fix. ++ */ ++ LeaveWindow(pDev); ++ if (master) ++ LeaveWindow(master); ++ UpdateSpriteForScreen(pDev, pScreen); ++ } + } + + /** +-- +2.41.0 + diff -Nru xorg-server-21.1.3/debian/patches/dix-Don-t-send-touch-end-to-clients-that-do-async-gr.patch xorg-server-21.1.4/debian/patches/dix-Don-t-send-touch-end-to-clients-that-do-async-gr.patch --- xorg-server-21.1.3/debian/patches/dix-Don-t-send-touch-end-to-clients-that-do-async-gr.patch 2023-10-25 12:07:28.000000000 +0000 +++ xorg-server-21.1.4/debian/patches/dix-Don-t-send-touch-end-to-clients-that-do-async-gr.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -From 9d05ee10c231edacc69b342677ae8c3cc32f97e5 Mon Sep 17 00:00:00 2001 -From: Povilas Kanapickas -Date: Sun, 16 Jan 2022 10:42:15 +0200 -Subject: [PATCH] dix: Don't send touch end to clients that do async grab - without touches - -GTK3 menu widget creates a selection for touch and other events and -after receiving touch events creates an async grab that excludes touch -events. Unfortunately it relies on X server not sending the touch end -event in order to function properly. Sending touch end event will cause -it to think that the initiating touch ended and when it actually ends, -the ButtonRelease event will make it think that the menu should be -closed. As a result, the menu will be open only for the duration of the -touch making it useless. - -This commit reverts f682e0563f736ed2c2c612ed575e05b6e3db945e. - -Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1255 - -Signed-off-by: Povilas Kanapickas -(cherry picked from commit 43e934a19f644cddedae73602e86429c9dc5074a) ---- - dix/events.c | 15 ++++++--------- - 1 file changed, 6 insertions(+), 9 deletions(-) - ---- a/dix/events.c -+++ b/dix/events.c -@@ -1491,16 +1491,13 @@ UpdateTouchesForGrab(DeviceIntPtr mouse) - CLIENT_BITS(listener->listener) == grab->resource) { - if (grab->grabtype == CORE || grab->grabtype == XI || - !xi2mask_isset(grab->xi2mask, mouse, XI_TouchBegin)) { -+ /* Note that the grab will override any current listeners and if these listeners -+ already received touch events then this is the place to send touch end event -+ to complete the touch sequence. - -- if (listener->type == TOUCH_LISTENER_REGULAR && -- listener->state != TOUCH_LISTENER_AWAITING_BEGIN && -- listener->state != TOUCH_LISTENER_HAS_END) { -- /* if the listener already got any events relating to the touch, we must send -- a touch end because the grab overrides the previous listener and won't -- itself send any touch events. -- */ -- TouchEmitTouchEnd(mouse, ti, 0, listener->listener); -- } -+ Unfortunately GTK3 menu widget implementation relies on not getting touch end -+ event, so we can't fix the current behavior. -+ */ - listener->type = TOUCH_LISTENER_POINTER_GRAB; - } else { - listener->type = TOUCH_LISTENER_GRAB; diff -Nru xorg-server-21.1.3/debian/patches/series xorg-server-21.1.4/debian/patches/series --- xorg-server-21.1.3/debian/patches/series 2023-10-25 12:07:28.000000000 +0000 +++ xorg-server-21.1.4/debian/patches/series 2023-10-25 12:07:29.000000000 +0000 @@ -25,13 +25,9 @@ xi2-resize-touch.patch fix-default-permissions.patch reset-transforms-in-closescreen.diff -CVE-2022-2319-pre1.patch -CVE-2022-2319.patch -CVE-2022-2320.patch CVE-2022-3550.patch CVE-2022-3551.patch re-calculate-the-clock-and-refresh-rate.diff -dix-Don-t-send-touch-end-to-clients-that-do-async-gr.patch CVE-2022-46340.patch CVE-2022-46341.patch CVE-2022-46342.patch @@ -42,3 +38,5 @@ CVE-2023-0494.patch 0001-dix-Force-update-LEDs-after-device-state-update-in-E.patch CVE-2023-1393.patch +CVE-2023-5367.patch +CVE-2023-5380.patch diff -Nru xorg-server-21.1.3/depcomp xorg-server-21.1.4/depcomp --- xorg-server-21.1.3/depcomp 2022-01-02 22:42:13.000000000 +0000 +++ xorg-server-21.1.4/depcomp 2022-07-12 13:28:13.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru xorg-server-21.1.3/dix/Makefile.in xorg-server-21.1.4/dix/Makefile.in --- xorg-server-21.1.3/dix/Makefile.in 2022-01-02 22:42:09.000000000 +0000 +++ xorg-server-21.1.4/dix/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/dix/events.c xorg-server-21.1.4/dix/events.c --- xorg-server-21.1.3/dix/events.c 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/dix/events.c 2022-07-12 13:27:57.000000000 +0000 @@ -467,6 +467,20 @@ return xi2mask_isset(inputMasks->xi2mask, dev, evtype); } +/** + * When processing events we operate on InternalEvent pointers. They may actually refer to a + * an instance of DeviceEvent, GestureEvent or any other event that comprises the InternalEvent + * union. This works well in practice because we always look into event type before doing anything, + * except in the case of copying the event. Any copying of InternalEvent should use this function + * instead of doing *dst_event = *src_event whenever it's not clear whether source event actually + * points to full InternalEvent instance. + */ +void +CopyPartialInternalEvent(InternalEvent* dst_event, const InternalEvent* src_event) +{ + memcpy(dst_event, src_event, src_event->any.length); +} + Mask GetEventMask(DeviceIntPtr dev, xEvent *event, InputClients * other) { @@ -1491,16 +1505,13 @@ CLIENT_BITS(listener->listener) == grab->resource) { if (grab->grabtype == CORE || grab->grabtype == XI || !xi2mask_isset(grab->xi2mask, mouse, XI_TouchBegin)) { + /* Note that the grab will override any current listeners and if these listeners + already received touch events then this is the place to send touch end event + to complete the touch sequence. - if (listener->type == TOUCH_LISTENER_REGULAR && - listener->state != TOUCH_LISTENER_AWAITING_BEGIN && - listener->state != TOUCH_LISTENER_HAS_END) { - /* if the listener already got any events relating to the touch, we must send - a touch end because the grab overrides the previous listener and won't - itself send any touch events. - */ - TouchEmitTouchEnd(mouse, ti, 0, listener->listener); - } + Unfortunately GTK3 menu widget implementation relies on not getting touch end + event, so we can't fix the current behavior. + */ listener->type = TOUCH_LISTENER_POINTER_GRAB; } else { listener->type = TOUCH_LISTENER_GRAB; @@ -3873,7 +3884,7 @@ if (grabinfo->sync.state == FROZEN_NO_EVENT) grabinfo->sync.state = FROZEN_WITH_EVENT; - *grabinfo->sync.event = *real_event; + CopyPartialInternalEvent(grabinfo->sync.event, real_event); } static BOOL @@ -4455,7 +4466,7 @@ case FREEZE_NEXT_EVENT: grabinfo->sync.state = FROZEN_WITH_EVENT; FreezeThaw(thisDev, TRUE); - *grabinfo->sync.event = *event; + CopyPartialInternalEvent(grabinfo->sync.event, event); break; } } diff -Nru xorg-server-21.1.3/doc/Makefile.in xorg-server-21.1.4/doc/Makefile.in --- xorg-server-21.1.3/doc/Makefile.in 2022-01-02 22:42:09.000000000 +0000 +++ xorg-server-21.1.4/doc/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/doc/dtrace/Makefile.in xorg-server-21.1.4/doc/dtrace/Makefile.in --- xorg-server-21.1.3/doc/dtrace/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/doc/dtrace/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/dri3/Makefile.in xorg-server-21.1.4/dri3/Makefile.in --- xorg-server-21.1.3/dri3/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/dri3/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/exa/Makefile.in xorg-server-21.1.4/exa/Makefile.in --- xorg-server-21.1.3/exa/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/exa/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/fb/Makefile.in xorg-server-21.1.4/fb/Makefile.in --- xorg-server-21.1.3/fb/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/fb/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/glamor/Makefile.in xorg-server-21.1.4/glamor/Makefile.in --- xorg-server-21.1.3/glamor/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/glamor/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/glx/Makefile.in xorg-server-21.1.4/glx/Makefile.in --- xorg-server-21.1.3/glx/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/glx/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/Makefile.in xorg-server-21.1.4/hw/Makefile.in --- xorg-server-21.1.3/hw/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/hw/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/kdrive/Makefile.in xorg-server-21.1.4/hw/kdrive/Makefile.in --- xorg-server-21.1.3/hw/kdrive/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/hw/kdrive/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/kdrive/ephyr/Makefile.in xorg-server-21.1.4/hw/kdrive/ephyr/Makefile.in --- xorg-server-21.1.3/hw/kdrive/ephyr/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/hw/kdrive/ephyr/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/kdrive/ephyr/man/Makefile.in xorg-server-21.1.4/hw/kdrive/ephyr/man/Makefile.in --- xorg-server-21.1.3/hw/kdrive/ephyr/man/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/hw/kdrive/ephyr/man/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/kdrive/src/Makefile.in xorg-server-21.1.4/hw/kdrive/src/Makefile.in --- xorg-server-21.1.3/hw/kdrive/src/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/hw/kdrive/src/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/vfb/Makefile.in xorg-server-21.1.4/hw/vfb/Makefile.in --- xorg-server-21.1.3/hw/vfb/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/hw/vfb/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/vfb/man/Makefile.in xorg-server-21.1.4/hw/vfb/man/Makefile.in --- xorg-server-21.1.3/hw/vfb/man/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/hw/vfb/man/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/Makefile.in xorg-server-21.1.4/hw/xfree86/Makefile.in --- xorg-server-21.1.3/hw/xfree86/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -994,7 +994,8 @@ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive -install-exec: install-exec-recursive +install-exec: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive @@ -1103,7 +1104,7 @@ @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: $(am__recursive_targets) all check install install-am \ - install-exec-am install-strip uninstall-am + install-exec install-exec-am install-strip uninstall-am .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles check check-am clean clean-binPROGRAMS \ diff -Nru xorg-server-21.1.3/hw/xfree86/common/Makefile.in xorg-server-21.1.4/hw/xfree86/common/Makefile.in --- xorg-server-21.1.3/hw/xfree86/common/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/common/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -891,7 +891,8 @@ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am +install-exec: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -1053,7 +1054,7 @@ uninstall-am: uninstall-sdkHEADERS -.MAKE: all check install install-am install-strip +.MAKE: all check install install-am install-exec install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ diff -Nru xorg-server-21.1.3/hw/xfree86/ddc/Makefile.in xorg-server-21.1.4/hw/xfree86/ddc/Makefile.in --- xorg-server-21.1.3/hw/xfree86/ddc/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/ddc/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/ddc/print_edid.c xorg-server-21.1.4/hw/xfree86/ddc/print_edid.c --- xorg-server-21.1.3/hw/xfree86/ddc/print_edid.c 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/ddc/print_edid.c 2022-07-12 13:27:57.000000000 +0000 @@ -507,7 +507,7 @@ } if (det_mon->type >= DS_VENDOR && det_mon->type <= DS_VENDOR_MAX) { xf86DrvMsg(scrnIndex, X_INFO, - "Unknown vendor-specific block %hx\n", + "Unknown vendor-specific block %x\n", det_mon->type - DS_VENDOR); } diff -Nru xorg-server-21.1.3/hw/xfree86/dixmods/Makefile.in xorg-server-21.1.4/hw/xfree86/dixmods/Makefile.in --- xorg-server-21.1.3/hw/xfree86/dixmods/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/dixmods/Makefile.in 2022-07-12 13:28:10.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/doc/Makefile.in xorg-server-21.1.4/hw/xfree86/doc/Makefile.in --- xorg-server-21.1.3/hw/xfree86/doc/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/doc/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/dri/Makefile.in xorg-server-21.1.4/hw/xfree86/dri/Makefile.in --- xorg-server-21.1.3/hw/xfree86/dri/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/dri/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/dri2/Makefile.in xorg-server-21.1.4/hw/xfree86/dri2/Makefile.in --- xorg-server-21.1.3/hw/xfree86/dri2/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/dri2/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/dri2/pci_ids/Makefile.in xorg-server-21.1.4/hw/xfree86/dri2/pci_ids/Makefile.in --- xorg-server-21.1.3/hw/xfree86/dri2/pci_ids/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/dri2/pci_ids/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/drivers/Makefile.in xorg-server-21.1.4/hw/xfree86/drivers/Makefile.in --- xorg-server-21.1.3/hw/xfree86/drivers/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/drivers/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/drivers/inputtest/Makefile.in xorg-server-21.1.4/hw/xfree86/drivers/inputtest/Makefile.in --- xorg-server-21.1.3/hw/xfree86/drivers/inputtest/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/drivers/inputtest/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/drivers/inputtest/xf86-input-inputtest.c xorg-server-21.1.4/hw/xfree86/drivers/inputtest/xf86-input-inputtest.c --- xorg-server-21.1.3/hw/xfree86/drivers/inputtest/xf86-input-inputtest.c 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/drivers/inputtest/xf86-input-inputtest.c 2022-07-12 13:27:57.000000000 +0000 @@ -856,39 +856,48 @@ driver_data->buffer.valid_length += read_size; while (1) { - xf86ITEventHeader *event_header; + xf86ITEventHeader event_header; char *event_begin = driver_data->buffer.data + processed_size; if (driver_data->buffer.valid_length - processed_size < sizeof(xf86ITEventHeader)) break; - event_header = (xf86ITEventHeader*) event_begin; + /* Note that event_begin pointer is not aligned, accessing it directly is + undefined behavior. We must use memcpy to copy the data to aligned data + area. Most compilers will optimize out this call out and use whatever + is most efficient to access unaligned data on a particular platform */ + memcpy(&event_header, event_begin, sizeof(xf86ITEventHeader)); - if (event_header->length >= EVENT_BUFFER_SIZE) { + if (event_header.length >= EVENT_BUFFER_SIZE) { xf86IDrvMsg(pInfo, X_ERROR, "Received event with too long length: %d\n", - event_header->length); + event_header.length); teardown_client_connection(pInfo); return; } - if (driver_data->buffer.valid_length - processed_size < event_header->length) + if (driver_data->buffer.valid_length - processed_size < event_header.length) break; - if (is_supported_event(event_header->type)) { - int expected_event_size = get_event_size(event_header->type); + if (is_supported_event(event_header.type)) { + int expected_event_size = get_event_size(event_header.type); - if (event_header->length != expected_event_size) { + if (event_header.length != expected_event_size) { xf86IDrvMsg(pInfo, X_ERROR, "Unexpected event length: was %d bytes, " "expected %d (event type: %d)\n", - event_header->length, expected_event_size, - (int) event_header->type); + event_header.length, expected_event_size, + (int) event_header.type); teardown_client_connection(pInfo); return; } - handle_event(pInfo, (xf86ITEventAny*) event_begin); + /* We could use event_begin pointer directly, but we want to ensure correct + data alignment (if only so that address sanitizer does not complain) */ + xf86ITEventAny event_data; + memset(&event_data, 0, sizeof(event_data)); + memcpy(&event_data, event_begin, event_header.length); + handle_event(pInfo, &event_data); } - processed_size += event_header->length; + processed_size += event_header.length; } if (processed_size > 0) { @@ -1005,7 +1014,19 @@ unlink(driver_data->socket_path); +#ifdef SOCK_NONBLOCK driver_data->socket_fd = socket(PF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0); +#else + int fd = socket(PF_UNIX, SOCK_STREAM, 0); + if (fd >= 0) { + flags = fcntl(fd, F_GETFL, 0); + if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0) { + fd = -1; + } + } + driver_data->socket_fd = fd; +#endif + if (driver_data->socket_fd < 0) { xf86IDrvMsg(pInfo, X_ERROR, "Failed to create a socket for communication: %s\n", strerror(errno)); diff -Nru xorg-server-21.1.3/hw/xfree86/drivers/modesetting/Makefile.in xorg-server-21.1.4/hw/xfree86/drivers/modesetting/Makefile.in --- xorg-server-21.1.3/hw/xfree86/drivers/modesetting/Makefile.in 2022-01-02 22:42:10.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/drivers/modesetting/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/exa/Makefile.in xorg-server-21.1.4/hw/xfree86/exa/Makefile.in --- xorg-server-21.1.3/hw/xfree86/exa/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/exa/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/exa/man/Makefile.in xorg-server-21.1.4/hw/xfree86/exa/man/Makefile.in --- xorg-server-21.1.3/hw/xfree86/exa/man/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/exa/man/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/fbdevhw/Makefile.in xorg-server-21.1.4/hw/xfree86/fbdevhw/Makefile.in --- xorg-server-21.1.3/hw/xfree86/fbdevhw/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/fbdevhw/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/fbdevhw/man/Makefile.in xorg-server-21.1.4/hw/xfree86/fbdevhw/man/Makefile.in --- xorg-server-21.1.3/hw/xfree86/fbdevhw/man/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/fbdevhw/man/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/glamor_egl/Makefile.in xorg-server-21.1.4/hw/xfree86/glamor_egl/Makefile.in --- xorg-server-21.1.3/hw/xfree86/glamor_egl/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/glamor_egl/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/i2c/Makefile.in xorg-server-21.1.4/hw/xfree86/i2c/Makefile.in --- xorg-server-21.1.3/hw/xfree86/i2c/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/i2c/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/int10/Makefile.in xorg-server-21.1.4/hw/xfree86/int10/Makefile.in --- xorg-server-21.1.3/hw/xfree86/int10/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/int10/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/loader/Makefile.in xorg-server-21.1.4/hw/xfree86/loader/Makefile.in --- xorg-server-21.1.3/hw/xfree86/loader/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/loader/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/man/Makefile.in xorg-server-21.1.4/hw/xfree86/man/Makefile.in --- xorg-server-21.1.3/hw/xfree86/man/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/man/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/meson.build xorg-server-21.1.4/hw/xfree86/meson.build --- xorg-server-21.1.3/hw/xfree86/meson.build 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/meson.build 2022-07-12 13:27:57.000000000 +0000 @@ -75,7 +75,7 @@ if host_machine.system() == 'cygwin' or host_machine.system() == 'windows' linker_export_flags = '-Wl,--export-all-symbols' -elif host_machine.system() == 'sunos' +elif host_machine.system() == 'sunos' or host_machine.system() == 'darwin' linker_export_flags = [] else linker_export_flags = '-Wl,--export-dynamic' diff -Nru xorg-server-21.1.3/hw/xfree86/modes/Makefile.in xorg-server-21.1.4/hw/xfree86/modes/Makefile.in --- xorg-server-21.1.3/hw/xfree86/modes/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/modes/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/os-support/Makefile.in xorg-server-21.1.4/hw/xfree86/os-support/Makefile.in --- xorg-server-21.1.3/hw/xfree86/os-support/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/os-support/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/os-support/bsd/Makefile.in xorg-server-21.1.4/hw/xfree86/os-support/bsd/Makefile.in --- xorg-server-21.1.3/hw/xfree86/os-support/bsd/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/os-support/bsd/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/os-support/bus/Makefile.in xorg-server-21.1.4/hw/xfree86/os-support/bus/Makefile.in --- xorg-server-21.1.3/hw/xfree86/os-support/bus/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/os-support/bus/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/os-support/hurd/Makefile.in xorg-server-21.1.4/hw/xfree86/os-support/hurd/Makefile.in --- xorg-server-21.1.3/hw/xfree86/os-support/hurd/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/os-support/hurd/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/os-support/linux/Makefile.in xorg-server-21.1.4/hw/xfree86/os-support/linux/Makefile.in --- xorg-server-21.1.3/hw/xfree86/os-support/linux/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/os-support/linux/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/os-support/misc/Makefile.in xorg-server-21.1.4/hw/xfree86/os-support/misc/Makefile.in --- xorg-server-21.1.3/hw/xfree86/os-support/misc/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/os-support/misc/Makefile.in 2022-07-12 13:28:11.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/os-support/solaris/Makefile.in xorg-server-21.1.4/hw/xfree86/os-support/solaris/Makefile.in --- xorg-server-21.1.3/hw/xfree86/os-support/solaris/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/os-support/solaris/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/os-support/stub/Makefile.in xorg-server-21.1.4/hw/xfree86/os-support/stub/Makefile.in --- xorg-server-21.1.3/hw/xfree86/os-support/stub/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/os-support/stub/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/parser/Makefile.in xorg-server-21.1.4/hw/xfree86/parser/Makefile.in --- xorg-server-21.1.3/hw/xfree86/parser/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/parser/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/ramdac/Makefile.in xorg-server-21.1.4/hw/xfree86/ramdac/Makefile.in --- xorg-server-21.1.3/hw/xfree86/ramdac/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/ramdac/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/shadowfb/Makefile.in xorg-server-21.1.4/hw/xfree86/shadowfb/Makefile.in --- xorg-server-21.1.3/hw/xfree86/shadowfb/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/shadowfb/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/utils/Makefile.in xorg-server-21.1.4/hw/xfree86/utils/Makefile.in --- xorg-server-21.1.3/hw/xfree86/utils/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/utils/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/utils/gtf/Makefile.in xorg-server-21.1.4/hw/xfree86/utils/gtf/Makefile.in --- xorg-server-21.1.3/hw/xfree86/utils/gtf/Makefile.in 2022-01-02 22:42:11.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/utils/gtf/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/utils/man/Makefile.in xorg-server-21.1.4/hw/xfree86/utils/man/Makefile.in --- xorg-server-21.1.3/hw/xfree86/utils/man/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/utils/man/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/vgahw/Makefile.in xorg-server-21.1.4/hw/xfree86/vgahw/Makefile.in --- xorg-server-21.1.3/hw/xfree86/vgahw/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/vgahw/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/x86emu/Makefile.in xorg-server-21.1.4/hw/xfree86/x86emu/Makefile.in --- xorg-server-21.1.3/hw/xfree86/x86emu/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/x86emu/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xfree86/xkb/Makefile.in xorg-server-21.1.4/hw/xfree86/xkb/Makefile.in --- xorg-server-21.1.3/hw/xfree86/xkb/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/hw/xfree86/xkb/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xnest/Makefile.in xorg-server-21.1.4/hw/xnest/Makefile.in --- xorg-server-21.1.3/hw/xnest/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/hw/xnest/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xnest/man/Makefile.in xorg-server-21.1.4/hw/xnest/man/Makefile.in --- xorg-server-21.1.3/hw/xnest/man/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/hw/xnest/man/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xquartz/GL/Makefile.in xorg-server-21.1.4/hw/xquartz/GL/Makefile.in --- xorg-server-21.1.3/hw/xquartz/GL/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/GL/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xquartz/Makefile.am xorg-server-21.1.4/hw/xquartz/Makefile.am --- xorg-server-21.1.3/hw/xquartz/Makefile.am 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/Makefile.am 2022-07-12 13:27:57.000000000 +0000 @@ -3,6 +3,7 @@ AM_OBJCFLAGS = $(DIX_CFLAGS) AM_CPPFLAGS = \ -DXSERVER_VERSION=\"$(VERSION)\" \ + -DBUNDLE_ID_PREFIX=\"$(BUNDLE_ID_PREFIX)\" \ -DUSE_NEW_CLUT \ -DXFree86Server \ -I$(top_srcdir)/miext/rootless \ @@ -21,6 +22,7 @@ libXquartz_la_SOURCES = \ $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/mi/miinitext.h \ + NSUserDefaults+XQuartzDefaults.m \ X11Application.m \ X11Controller.m \ applewm.c \ @@ -36,6 +38,7 @@ libXquartz_la_LIBADD = $(top_builddir)/pseudoramiX/libPseudoramiX.la EXTRA_DIST = \ + NSUserDefaults+XQuartzDefaults.h \ X11Application.h \ X11Controller.h \ applewmExt.h \ diff -Nru xorg-server-21.1.3/hw/xquartz/Makefile.in xorg-server-21.1.4/hw/xquartz/Makefile.in --- xorg-server-21.1.3/hw/xquartz/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -111,7 +111,8 @@ LTLIBRARIES = $(noinst_LTLIBRARIES) libXquartz_la_DEPENDENCIES = \ $(top_builddir)/pseudoramiX/libPseudoramiX.la -am_libXquartz_la_OBJECTS = miinitext.lo X11Application.lo \ +am_libXquartz_la_OBJECTS = miinitext.lo \ + NSUserDefaults+XQuartzDefaults.lo X11Application.lo \ X11Controller.lo applewm.lo darwin.lo darwinEvents.lo \ darwinXinput.lo keysym2ucs.lo quartz.lo quartzKeyboard.lo \ quartzStartup.lo quartzRandR.lo @@ -135,13 +136,13 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/X11Application.Plo \ - ./$(DEPDIR)/X11Controller.Plo ./$(DEPDIR)/applewm.Plo \ - ./$(DEPDIR)/darwin.Plo ./$(DEPDIR)/darwinEvents.Plo \ - ./$(DEPDIR)/darwinXinput.Plo ./$(DEPDIR)/keysym2ucs.Plo \ - ./$(DEPDIR)/miinitext.Plo ./$(DEPDIR)/quartz.Plo \ - ./$(DEPDIR)/quartzKeyboard.Plo ./$(DEPDIR)/quartzRandR.Plo \ - ./$(DEPDIR)/quartzStartup.Plo +am__depfiles_remade = ./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Plo \ + ./$(DEPDIR)/X11Application.Plo ./$(DEPDIR)/X11Controller.Plo \ + ./$(DEPDIR)/applewm.Plo ./$(DEPDIR)/darwin.Plo \ + ./$(DEPDIR)/darwinEvents.Plo ./$(DEPDIR)/darwinXinput.Plo \ + ./$(DEPDIR)/keysym2ucs.Plo ./$(DEPDIR)/miinitext.Plo \ + ./$(DEPDIR)/quartz.Plo ./$(DEPDIR)/quartzKeyboard.Plo \ + ./$(DEPDIR)/quartzRandR.Plo ./$(DEPDIR)/quartzStartup.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -576,6 +577,7 @@ AM_OBJCFLAGS = $(DIX_CFLAGS) AM_CPPFLAGS = \ -DXSERVER_VERSION=\"$(VERSION)\" \ + -DBUNDLE_ID_PREFIX=\"$(BUNDLE_ID_PREFIX)\" \ -DUSE_NEW_CLUT \ -DXFree86Server \ -I$(top_srcdir)/miext/rootless \ @@ -589,6 +591,7 @@ libXquartz_la_SOURCES = \ $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/mi/miinitext.h \ + NSUserDefaults+XQuartzDefaults.m \ X11Application.m \ X11Controller.m \ applewm.c \ @@ -603,6 +606,7 @@ libXquartz_la_LIBADD = $(top_builddir)/pseudoramiX/libPseudoramiX.la EXTRA_DIST = \ + NSUserDefaults+XQuartzDefaults.h \ X11Application.h \ X11Controller.h \ applewmExt.h \ @@ -670,6 +674,7 @@ distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/X11Application.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/X11Controller.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/applewm.Plo@am__quote@ # am--include-marker @@ -942,7 +947,8 @@ mostlyclean-am distclean: distclean-recursive - -rm -f ./$(DEPDIR)/X11Application.Plo + -rm -f ./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Plo + -rm -f ./$(DEPDIR)/X11Application.Plo -rm -f ./$(DEPDIR)/X11Controller.Plo -rm -f ./$(DEPDIR)/applewm.Plo -rm -f ./$(DEPDIR)/darwin.Plo @@ -999,7 +1005,8 @@ installcheck-am: maintainer-clean: maintainer-clean-recursive - -rm -f ./$(DEPDIR)/X11Application.Plo + -rm -f ./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Plo + -rm -f ./$(DEPDIR)/X11Application.Plo -rm -f ./$(DEPDIR)/X11Controller.Plo -rm -f ./$(DEPDIR)/applewm.Plo -rm -f ./$(DEPDIR)/darwin.Plo diff -Nru xorg-server-21.1.3/hw/xquartz/NSUserDefaults+XQuartzDefaults.h xorg-server-21.1.4/hw/xquartz/NSUserDefaults+XQuartzDefaults.h --- xorg-server-21.1.3/hw/xquartz/NSUserDefaults+XQuartzDefaults.h 1970-01-01 00:00:00.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/NSUserDefaults+XQuartzDefaults.h 2022-07-12 13:27:57.000000000 +0000 @@ -0,0 +1,49 @@ +// +// NSUserDefaults+XQuartzDefaults.h +// XQuartz +// +// Created by Jeremy Huddleston Sequoia on 2021.02.19. +// Copyright (c) 2021 Apple Inc. All rights reserved. +// + +#import + +extern NSString * const XQuartzPrefKeyAppsMenu; +extern NSString * const XQuartzPrefKeyFakeButtons; +extern NSString * const XQuartzPrefKeyFakeButton2; +extern NSString * const XQuartzPrefKeyFakeButton3; +extern NSString * const XQuartzPrefKeyKeyEquivs; +extern NSString * const XQuartzPrefKeyFullscreenHotkeys; +extern NSString * const XQuartzPrefKeyFullscreenMenu; +extern NSString * const XQuartzPrefKeySyncKeymap; +extern NSString * const XQuartzPrefKeyDepth; +extern NSString * const XQuartzPrefKeyNoAuth; +extern NSString * const XQuartzPrefKeyNoTCP; +extern NSString * const XQuartzPrefKeyDoneXinitCheck; +extern NSString * const XQuartzPrefKeyNoQuitAlert; +extern NSString * const XQuartzPrefKeyNoRANDRAlert; +extern NSString * const XQuartzPrefKeyOptionSendsAlt; +extern NSString * const XQuartzPrefKeyAppKitModifiers; +extern NSString * const XQuartzPrefKeyWindowItemModifiers; +extern NSString * const XQuartzPrefKeyRootless; +extern NSString * const XQuartzPrefKeyRENDERExtension; +extern NSString * const XQuartzPrefKeyTESTExtension; +extern NSString * const XQuartzPrefKeyLoginShell; +extern NSString * const XQuartzPrefKeyClickThrough; +extern NSString * const XQuartzPrefKeyFocusFollowsMouse; +extern NSString * const XQuartzPrefKeyFocusOnNewWindow; + +extern NSString * const XQuartzPrefKeyScrollInDeviceDirection; +extern NSString * const XQuartzPrefKeySyncPasteboard; +extern NSString * const XQuartzPrefKeySyncPasteboardToClipboard; +extern NSString * const XQuartzPrefKeySyncPasteboardToPrimary; +extern NSString * const XQuartzPrefKeySyncClipboardToPasteBoard; +extern NSString * const XQuartzPrefKeySyncPrimaryOnSelect; + +@interface NSUserDefaults (XQuartzDefaults) + ++ (NSUserDefaults *)globalDefaults; ++ (NSUserDefaults *)dockDefaults; ++ (NSUserDefaults *)xquartzDefaults; + +@end diff -Nru xorg-server-21.1.3/hw/xquartz/NSUserDefaults+XQuartzDefaults.m xorg-server-21.1.4/hw/xquartz/NSUserDefaults+XQuartzDefaults.m --- xorg-server-21.1.3/hw/xquartz/NSUserDefaults+XQuartzDefaults.m 1970-01-01 00:00:00.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/NSUserDefaults+XQuartzDefaults.m 2022-07-12 13:27:57.000000000 +0000 @@ -0,0 +1,149 @@ +// +// NSUserDefaults+XQuartzDefaults.m +// XQuartz +// +// Created by Jeremy Huddleston Sequoia on 2021.02.19. +// Copyright (c) 2021 Apple Inc. All rights reserved. +// + +#import "NSUserDefaults+XQuartzDefaults.h" +#import + +NSString * const XQuartzPrefKeyAppsMenu = @"apps_menu"; +NSString * const XQuartzPrefKeyFakeButtons = @"enable_fake_buttons"; +NSString * const XQuartzPrefKeyFakeButton2 = @"fake_button2"; +NSString * const XQuartzPrefKeyFakeButton3 = @"fake_button3"; +NSString * const XQuartzPrefKeyKeyEquivs = @"enable_key_equivalents"; +NSString * const XQuartzPrefKeyFullscreenHotkeys = @"fullscreen_hotkeys"; +NSString * const XQuartzPrefKeyFullscreenMenu = @"fullscreen_menu"; +NSString * const XQuartzPrefKeySyncKeymap = @"sync_keymap"; +NSString * const XQuartzPrefKeyDepth = @"depth"; +NSString * const XQuartzPrefKeyNoAuth = @"no_auth"; +NSString * const XQuartzPrefKeyNoTCP = @"nolisten_tcp"; +NSString * const XQuartzPrefKeyDoneXinitCheck = @"done_xinit_check"; +NSString * const XQuartzPrefKeyNoQuitAlert = @"no_quit_alert"; +NSString * const XQuartzPrefKeyNoRANDRAlert = @"no_randr_alert"; +NSString * const XQuartzPrefKeyOptionSendsAlt = @"option_sends_alt"; +NSString * const XQuartzPrefKeyAppKitModifiers = @"appkit_modifiers"; +NSString * const XQuartzPrefKeyWindowItemModifiers = @"window_item_modifiers"; +NSString * const XQuartzPrefKeyRootless = @"rootless"; +NSString * const XQuartzPrefKeyRENDERExtension = @"enable_render_extension"; +NSString * const XQuartzPrefKeyTESTExtension = @"enable_test_extensions"; +NSString * const XQuartzPrefKeyLoginShell = @"login_shell"; +NSString * const XQuartzPrefKeyUpdateFeed = @"update_feed"; +NSString * const XQuartzPrefKeyClickThrough = @"wm_click_through"; +NSString * const XQuartzPrefKeyFocusFollowsMouse = @"wm_ffm"; +NSString * const XQuartzPrefKeyFocusOnNewWindow = @"wm_focus_on_new_window"; + +NSString * const XQuartzPrefKeyScrollInDeviceDirection = @"scroll_in_device_direction"; +NSString * const XQuartzPrefKeySyncPasteboard = @"sync_pasteboard"; +NSString * const XQuartzPrefKeySyncPasteboardToClipboard = @"sync_pasteboard_to_clipboard"; +NSString * const XQuartzPrefKeySyncPasteboardToPrimary = @"sync_pasteboard_to_primary"; +NSString * const XQuartzPrefKeySyncClipboardToPasteBoard = @"sync_clipboard_to_pasteboard"; +NSString * const XQuartzPrefKeySyncPrimaryOnSelect = @"sync_primary_on_select"; + +@implementation NSUserDefaults (XQuartzDefaults) + ++ (NSUserDefaults *)globalDefaults +{ + static dispatch_once_t once; + static NSUserDefaults *defaults; + + dispatch_once(&once, ^{ + NSString * const defaultsDomain = @".GlobalPreferences"; + defaults = [[[NSUserDefaults alloc] initWithSuiteName:defaultsDomain] retain]; + + NSDictionary * const defaultDefaultsDict = @{ + @"AppleSpacesSwitchOnActivate" : @(YES), + }; + + [defaults registerDefaults:defaultDefaultsDict]; + }); + + return defaults; +} + ++ (NSUserDefaults *)dockDefaults +{ + static dispatch_once_t once; + static NSUserDefaults *defaults; + + dispatch_once(&once, ^{ + NSString * const defaultsDomain = @"com.apple.dock"; + defaults = [[[NSUserDefaults alloc] initWithSuiteName:defaultsDomain] retain]; + + NSDictionary * const defaultDefaultsDict = @{ + @"workspaces" : @(NO), + }; + + [defaults registerDefaults:defaultDefaultsDict]; + }); + + return defaults; +} + ++ (NSUserDefaults *)xquartzDefaults +{ + static dispatch_once_t once; + static NSUserDefaults *defaults; + + dispatch_once(&once, ^{ + NSString * const defaultsDomain = @(BUNDLE_ID_PREFIX ".X11"); + NSString * const defaultDefaultsDomain = NSBundle.mainBundle.bundleIdentifier; + if ([defaultsDomain isEqualToString:defaultDefaultsDomain]) { + defaults = [NSUserDefaults.standardUserDefaults retain]; + } else { + defaults = [[[NSUserDefaults alloc] initWithSuiteName:defaultsDomain] retain]; + } + + NSArray * const defaultAppsMenu = @[ + @[NSLocalizedString(@"Terminal", @"Terminal"), @"xterm", @"n"], + ]; + + NSString *defaultWindowItemModifiers = @"command"; + NSString * const defaultWindowItemModifiersLocalized = NSLocalizedString(@"window item modifiers", @"window item modifiers"); + if (![defaultWindowItemModifiersLocalized isEqualToString:@"window item modifiers"]) { + defaultWindowItemModifiers = defaultWindowItemModifiersLocalized; + } + + NSDictionary * const defaultDefaultsDict = @{ + XQuartzPrefKeyAppsMenu : defaultAppsMenu, + XQuartzPrefKeyFakeButtons : @(NO), + // XQuartzPrefKeyFakeButton2 nil default + // XQuartzPrefKeyFakeButton3 nil default + XQuartzPrefKeyKeyEquivs : @(YES), + XQuartzPrefKeyFullscreenHotkeys : @(NO), + XQuartzPrefKeyFullscreenMenu : @(NO), + XQuartzPrefKeySyncKeymap : @(NO), + XQuartzPrefKeyDepth : @(-1), + XQuartzPrefKeyNoAuth : @(NO), + XQuartzPrefKeyNoTCP : @(NO), + XQuartzPrefKeyDoneXinitCheck : @(NO), + XQuartzPrefKeyNoQuitAlert : @(NO), + XQuartzPrefKeyNoRANDRAlert : @(NO), + XQuartzPrefKeyOptionSendsAlt : @(NO), + // XQuartzPrefKeyAppKitModifiers nil default + XQuartzPrefKeyWindowItemModifiers : defaultWindowItemModifiers, + XQuartzPrefKeyRootless : @(YES), + XQuartzPrefKeyRENDERExtension : @(YES), + XQuartzPrefKeyTESTExtension : @(NO), + XQuartzPrefKeyLoginShell : @"/bin/sh", + XQuartzPrefKeyClickThrough : @(NO), + XQuartzPrefKeyFocusFollowsMouse : @(NO), + XQuartzPrefKeyFocusOnNewWindow : @(YES), + + XQuartzPrefKeyScrollInDeviceDirection : @(NO), + XQuartzPrefKeySyncPasteboard : @(YES), + XQuartzPrefKeySyncPasteboardToClipboard : @(YES), + XQuartzPrefKeySyncPasteboardToPrimary : @(YES), + XQuartzPrefKeySyncClipboardToPasteBoard : @(YES), + XQuartzPrefKeySyncPrimaryOnSelect : @(NO), + }; + + [defaults registerDefaults:defaultDefaultsDict]; + }); + + return defaults; +} + +@end diff -Nru xorg-server-21.1.3/hw/xquartz/X11Application.h xorg-server-21.1.4/hw/xquartz/X11Application.h --- xorg-server-21.1.3/hw/xquartz/X11Application.h 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/X11Application.h 2022-07-12 13:27:57.000000000 +0000 @@ -42,20 +42,6 @@ @property (nonatomic, readwrite, strong) X11Controller *controller; @property (nonatomic, readonly, assign) OSX_BOOL x_active; -- (CFPropertyListRef)prefs_get_copy:(NSString *)key CF_RETURNS_RETAINED; -- (int)prefs_get_integer:(NSString *)key default:(int)def; -- (const char *)prefs_get_string:(NSString *)key default:(const char *)def; -- (float)prefs_get_float:(NSString *)key default:(float)def; -- (int)prefs_get_boolean:(NSString *)key default:(int)def; -- (NSURL *)prefs_copy_url:(NSString *)key default:(NSURL *)def - NS_RETURNS_RETAINED; -- (NSArray *)prefs_get_array:(NSString *)key; -- (void)prefs_set_integer:(NSString *)key value:(int)value; -- (void)prefs_set_float:(NSString *)key value:(float)value; -- (void)prefs_set_boolean:(NSString *)key value:(int)value; -- (void)prefs_set_array:(NSString *)key value:(NSArray *)value; -- (void)prefs_set_string:(NSString *)key value:(NSString *)value; -- (void)prefs_synchronize; @end extern X11Application * X11App; @@ -84,40 +70,6 @@ void X11ApplicationMain(int argc, char **argv, char **envp); -#define PREFS_APPSMENU "apps_menu" -#define PREFS_FAKEBUTTONS "enable_fake_buttons" -#define PREFS_KEYEQUIVS "enable_key_equivalents" -#define PREFS_FULLSCREEN_HOTKEYS "fullscreen_hotkeys" -#define PREFS_FULLSCREEN_MENU "fullscreen_menu" -#define PREFS_SYNC_KEYMAP "sync_keymap" -#define PREFS_DEPTH "depth" -#define PREFS_NO_AUTH "no_auth" -#define PREFS_NO_TCP "nolisten_tcp" -#define PREFS_DONE_XINIT_CHECK "done_xinit_check" -#define PREFS_NO_QUIT_ALERT "no_quit_alert" -#define PREFS_NO_RANDR_ALERT "no_randr_alert" -#define PREFS_OPTION_SENDS_ALT "option_sends_alt" -#define PREFS_FAKE_BUTTON2 "fake_button2" -#define PREFS_FAKE_BUTTON3 "fake_button3" -#define PREFS_APPKIT_MODIFIERS "appkit_modifiers" -#define PREFS_WINDOW_ITEM_MODIFIERS "window_item_modifiers" -#define PREFS_ROOTLESS "rootless" -#define PREFS_RENDER_EXTENSION "enable_render_extension" -#define PREFS_TEST_EXTENSIONS "enable_test_extensions" -#define PREFS_XP_OPTIONS "xp_options" -#define PREFS_LOGIN_SHELL "login_shell" -#define PREFS_UPDATE_FEED "update_feed" -#define PREFS_CLICK_THROUGH "wm_click_through" -#define PREFS_FFM "wm_ffm" -#define PREFS_FOCUS_ON_NEW_WINDOW "wm_focus_on_new_window" - -#define PREFS_SCROLL_IN_DEV_DIRECTION "scroll_in_device_direction" extern Bool XQuartzScrollInDeviceDirection; -#define PREFS_SYNC_PB "sync_pasteboard" -#define PREFS_SYNC_PB_TO_CLIPBOARD "sync_pasteboard_to_clipboard" -#define PREFS_SYNC_PB_TO_PRIMARY "sync_pasteboard_to_primary" -#define PREFS_SYNC_CLIPBOARD_TO_PB "sync_clipboard_to_pasteboard" -#define PREFS_SYNC_PRIMARY_ON_SELECT "sync_primary_on_select" - #endif /* X11APPLICATION_H */ diff -Nru xorg-server-21.1.3/hw/xquartz/X11Application.m xorg-server-21.1.4/hw/xquartz/X11Application.m --- xorg-server-21.1.3/hw/xquartz/X11Application.m 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/X11Application.m 2022-07-12 13:27:57.000000000 +0000 @@ -35,6 +35,7 @@ #endif #import "X11Application.h" +#import "NSUserDefaults+XQuartzDefaults.h" #include "darwin.h" #include "quartz.h" @@ -55,8 +56,6 @@ extern int xpbproxy_run(void); -#define DEFAULTS_FILE X11LIBDIR "/X11/xserver/Xquartz.plist" - #ifndef XSERVER_VERSION #define XSERVER_VERSION "?" #endif @@ -101,8 +100,6 @@ X11Application *X11App; -CFStringRef app_prefs_domain_cfstr = NULL; - #define ALL_KEY_MASKS (NSShiftKeyMask | NSControlKeyMask | \ NSAlternateKeyMask | NSCommandKeyMask) @@ -270,6 +267,8 @@ case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp: + case NSScrollWheel: + if ([e window] != nil) { /* Pointer event has an (AppKit) window. Probably something for the kit. */ for_x = NO; @@ -420,7 +419,7 @@ case NSApplicationActivatedEventType: for_x = NO; if ([e window] == nil && x_was_active) { - BOOL order_all_windows = YES, workspaces, ok; + BOOL order_all_windows = YES; for_appkit = NO; #if APPKIT_APPFLAGS_HACK @@ -433,26 +432,9 @@ [self set_front_process:nil]; /* Get the Spaces preference for SwitchOnActivate */ - (void)CFPreferencesAppSynchronize(CFSTR("com.apple.dock")); - workspaces = - CFPreferencesGetAppBooleanValue(CFSTR("workspaces"), - CFSTR( - "com.apple.dock"), - &ok); - if (!ok) - workspaces = NO; - + BOOL const workspaces = [NSUserDefaults.dockDefaults boolForKey:@"workspaces"]; if (workspaces) { - (void)CFPreferencesAppSynchronize(CFSTR( - ".GlobalPreferences")); - order_all_windows = - CFPreferencesGetAppBooleanValue(CFSTR( - "AppleSpacesSwitchOnActivate"), - CFSTR( - ".GlobalPreferences"), - &ok); - if (!ok) - order_all_windows = YES; + order_all_windows = [NSUserDefaults.globalDefaults boolForKey:@"AppleSpacesSwitchOnActivate"]; } /* TODO: In the workspaces && !AppleSpacesSwitchOnActivate case, the windows are ordered @@ -463,8 +445,7 @@ * be restoring one of them. */ if ([e data2] & 0x10) { // 0x10 (bfCPSOrderAllWindowsForward) is set when we use cmd-tab or the dock icon - DarwinSendDDXEvent(kXquartzBringAllToFront, 1, - order_all_windows); + DarwinSendDDXEvent(kXquartzBringAllToFront, 1, order_all_windows); } } break; @@ -487,12 +468,14 @@ break; /* for gcc */ } - if (for_appkit) [super sendEvent:e]; + if (for_appkit) { + [super sendEvent:e]; + } if (for_x) { dispatch_async(eventTranslationQueue, ^{ - [self sendX11NSEvent:e]; - }); + [self sendX11NSEvent:e]; + }); } } @@ -524,404 +507,50 @@ (void)[self.controller application:self openFile:cmd]; } -/* user preferences */ - -/* Note that these functions only work for arrays whose elements - can be toll-free-bridged between NS and CF worlds. */ - -static const void * -cfretain(CFAllocatorRef a, const void *b) -{ - return CFRetain(b); -} - -static void -cfrelease(CFAllocatorRef a, const void *b) -{ - CFRelease(b); -} - -CF_RETURNS_RETAINED -static CFMutableArrayRef -nsarray_to_cfarray(NSArray *in) -{ - CFMutableArrayRef out; - CFArrayCallBacks cb; - NSObject *ns; - const CFTypeRef *cf; - int i, count; - memset(&cb, 0, sizeof(cb)); - cb.version = 0; - cb.retain = cfretain; - cb.release = cfrelease; - - count = [in count]; - out = CFArrayCreateMutable(NULL, count, &cb); - - for (i = 0; i < count; i++) { - ns = [in objectAtIndex:i]; - - if ([ns isKindOfClass:[NSArray class]]) - cf = (CFTypeRef)nsarray_to_cfarray((NSArray *)ns); - else - cf = CFRetain((CFTypeRef)ns); - - CFArrayAppendValue(out, cf); - CFRelease(cf); - } - - return out; -} - -static NSMutableArray * -cfarray_to_nsarray(CFArrayRef in) +- (void) read_defaults { - NSMutableArray *out; - const CFTypeRef *cf; - NSObject *ns; - int i, count; - - count = CFArrayGetCount(in); - out = [[NSMutableArray alloc] initWithCapacity:count]; - - for (i = 0; i < count; i++) { - cf = CFArrayGetValueAtIndex(in, i); - - if (CFGetTypeID(cf) == CFArrayGetTypeID()) - ns = cfarray_to_nsarray((CFArrayRef)cf); - else - ns = [(id) cf retain]; - - [out addObject:ns]; - [ns release]; - } - - return out; -} + NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; -- (CFPropertyListRef) prefs_get_copy:(NSString *)key -{ - CFPropertyListRef value; + XQuartzRootlessDefault = [defaults boolForKey:XQuartzPrefKeyRootless]; + XQuartzFullscreenMenu = [defaults boolForKey:XQuartzPrefKeyFullscreenMenu]; + XQuartzFullscreenDisableHotkeys = ![defaults boolForKey:XQuartzPrefKeyFullscreenHotkeys]; - value = CFPreferencesCopyAppValue((CFStringRef)key, - app_prefs_domain_cfstr); - - if (value == NULL) { - static CFDictionaryRef defaults; - - if (defaults == NULL) { - CFStringRef error = NULL; - CFDataRef data; - CFURLRef url; - SInt32 error_code; - - url = (CFURLCreateFromFileSystemRepresentation - (NULL, (unsigned char *)DEFAULTS_FILE, - strlen(DEFAULTS_FILE), false)); - if (CFURLCreateDataAndPropertiesFromResource(NULL, url, &data, - NULL, NULL, - &error_code)) { - defaults = (CFPropertyListCreateFromXMLData - (NULL, data, - kCFPropertyListMutableContainersAndLeaves, - &error)); - if (error != NULL) CFRelease(error); - CFRelease(data); - } - CFRelease(url); + darwinFakeButtons = [defaults boolForKey:XQuartzPrefKeyFakeButtons]; + XQuartzOptionSendsAlt = [defaults boolForKey:XQuartzPrefKeyOptionSendsAlt]; - if (defaults != NULL) { - NSMutableArray *apps, *elt; - int count, i; - NSString *name, *nname; - - /* Localize the names in the default apps menu. */ - - apps = - [(NSDictionary *) defaults objectForKey:@PREFS_APPSMENU]; - if (apps != nil) { - count = [apps count]; - for (i = 0; i < count; i++) { - elt = [apps objectAtIndex:i]; - if (elt != nil && - [elt isKindOfClass:[NSArray class]]) { - name = [elt objectAtIndex:0]; - if (name != nil) { - nname = NSLocalizedString(name, nil); - if (nname != nil && nname != name) - [elt replaceObjectAtIndex:0 withObject: - nname]; - } - } - } - } - } + if (darwinFakeButtons) { + NSString * const fake2 = [defaults stringForKey:XQuartzPrefKeyFakeButton2]; + if (fake2) { + darwinFakeMouse2Mask = DarwinParseModifierList(fake2.UTF8String, TRUE); } - if (defaults != NULL) value = CFDictionaryGetValue(defaults, key); - if (value != NULL) CFRetain(value); - } - - return value; -} - -- (int) prefs_get_integer:(NSString *)key default:(int)def -{ - CFPropertyListRef value; - int ret; - - value = [self prefs_get_copy:key]; - - if (value != NULL && CFGetTypeID(value) == CFNumberGetTypeID()) - CFNumberGetValue(value, kCFNumberIntType, &ret); - else if (value != NULL && CFGetTypeID(value) == CFStringGetTypeID()) - ret = CFStringGetIntValue(value); - else - ret = def; - - if (value != NULL) CFRelease(value); - - return ret; -} - -- (const char *) prefs_get_string:(NSString *)key default:(const char *)def -{ - CFPropertyListRef value; - const char *ret = NULL; - - value = [self prefs_get_copy:key]; - - if (value != NULL && CFGetTypeID(value) == CFStringGetTypeID()) { - NSString *s = (NSString *)value; - - ret = [s UTF8String]; - } - - if (value != NULL) CFRelease(value); - - return ret != NULL ? ret : def; -} - -- (NSURL *) prefs_copy_url:(NSString *)key default:(NSURL *)def -{ - CFPropertyListRef value; - NSURL *ret = NULL; - - value = [self prefs_get_copy:key]; - - if (value != NULL && CFGetTypeID(value) == CFStringGetTypeID()) { - NSString *s = (NSString *)value; - - ret = [NSURL URLWithString:s]; - [ret retain]; - } - - if (value != NULL) CFRelease(value); - - return ret != NULL ? ret : def; -} - -- (float) prefs_get_float:(NSString *)key default:(float)def -{ - CFPropertyListRef value; - float ret = def; - - value = [self prefs_get_copy:key]; - - if (value != NULL - && CFGetTypeID(value) == CFNumberGetTypeID() - && CFNumberIsFloatType(value)) - CFNumberGetValue(value, kCFNumberFloatType, &ret); - else if (value != NULL && CFGetTypeID(value) == CFStringGetTypeID()) - ret = CFStringGetDoubleValue(value); - - if (value != NULL) CFRelease(value); - - return ret; -} - -- (int) prefs_get_boolean:(NSString *)key default:(int)def -{ - CFPropertyListRef value; - int ret = def; - - value = [self prefs_get_copy:key]; - - if (value != NULL) { - if (CFGetTypeID(value) == CFNumberGetTypeID()) - CFNumberGetValue(value, kCFNumberIntType, &ret); - else if (CFGetTypeID(value) == CFBooleanGetTypeID()) - ret = CFBooleanGetValue(value); - else if (CFGetTypeID(value) == CFStringGetTypeID()) { - const char *tem = [(NSString *) value UTF8String]; - if (strcasecmp(tem, "true") == 0 || strcasecmp(tem, "yes") == 0) - ret = YES; - else - ret = NO; + NSString * const fake3 = [defaults stringForKey:XQuartzPrefKeyFakeButton3]; + if (fake3) { + darwinFakeMouse3Mask = DarwinParseModifierList(fake3.UTF8String, TRUE); } - - CFRelease(value); } - return ret; -} - -- (NSArray *) prefs_get_array:(NSString *)key -{ - NSArray *ret = nil; - CFPropertyListRef value; - - value = [self prefs_get_copy:key]; - if (value != NULL) { - if (CFGetTypeID(value) == CFArrayGetTypeID()) - ret = [cfarray_to_nsarray (value)autorelease]; - - CFRelease(value); + NSString * const appKitModifiers = [defaults stringForKey:XQuartzPrefKeyAppKitModifiers]; + if (appKitModifiers) { + darwinAppKitModMask = DarwinParseModifierList(appKitModifiers.UTF8String, TRUE); } - return ret; -} - -- (void) prefs_set_integer:(NSString *)key value:(int)value -{ - CFNumberRef x; - - x = CFNumberCreate(NULL, kCFNumberIntType, &value); - - CFPreferencesSetValue((CFStringRef)key, (CFTypeRef)x, - app_prefs_domain_cfstr, - kCFPreferencesCurrentUser, - kCFPreferencesAnyHost); - - CFRelease(x); -} - -- (void) prefs_set_float:(NSString *)key value:(float)value -{ - CFNumberRef x; - - x = CFNumberCreate(NULL, kCFNumberFloatType, &value); - - CFPreferencesSetValue((CFStringRef)key, (CFTypeRef)x, - app_prefs_domain_cfstr, - kCFPreferencesCurrentUser, - kCFPreferencesAnyHost); - - CFRelease(x); -} - -- (void) prefs_set_boolean:(NSString *)key value:(int)value -{ - CFPreferencesSetValue( - (CFStringRef)key, - (CFTypeRef)(value ? kCFBooleanTrue - : kCFBooleanFalse), - app_prefs_domain_cfstr, - kCFPreferencesCurrentUser, kCFPreferencesAnyHost); - -} - -- (void) prefs_set_array:(NSString *)key value:(NSArray *)value -{ - CFArrayRef cfarray; - - cfarray = nsarray_to_cfarray(value); - CFPreferencesSetValue((CFStringRef)key, - (CFTypeRef)cfarray, - app_prefs_domain_cfstr, - kCFPreferencesCurrentUser, kCFPreferencesAnyHost); - CFRelease(cfarray); -} - -- (void) prefs_set_string:(NSString *)key value:(NSString *)value -{ - CFPreferencesSetValue((CFStringRef)key, (CFTypeRef)value, - app_prefs_domain_cfstr, kCFPreferencesCurrentUser, - kCFPreferencesAnyHost); -} - -- (void) prefs_synchronize -{ - CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication); -} - -- (void) read_defaults -{ - NSString *nsstr; - const char *tem; - - XQuartzRootlessDefault = [self prefs_get_boolean:@PREFS_ROOTLESS - default :XQuartzRootlessDefault]; - XQuartzFullscreenMenu = [self prefs_get_boolean:@PREFS_FULLSCREEN_MENU - default :XQuartzFullscreenMenu]; - XQuartzFullscreenDisableHotkeys = - ![self prefs_get_boolean:@PREFS_FULLSCREEN_HOTKEYS - default :! - XQuartzFullscreenDisableHotkeys]; - darwinFakeButtons = [self prefs_get_boolean:@PREFS_FAKEBUTTONS - default :darwinFakeButtons]; - XQuartzOptionSendsAlt = [self prefs_get_boolean:@PREFS_OPTION_SENDS_ALT - default :XQuartzOptionSendsAlt]; - - if (darwinFakeButtons) { - const char *fake2, *fake3; - - fake2 = [self prefs_get_string:@PREFS_FAKE_BUTTON2 default:NULL]; - fake3 = [self prefs_get_string:@PREFS_FAKE_BUTTON3 default:NULL]; - - if (fake2 != NULL) darwinFakeMouse2Mask = DarwinParseModifierList( - fake2, TRUE); - if (fake3 != NULL) darwinFakeMouse3Mask = DarwinParseModifierList( - fake3, TRUE); + NSString * const windowItemModifiers = [defaults stringForKey:XQuartzPrefKeyWindowItemModifiers]; + if (windowItemModifiers) { + windowItemModMask = DarwinParseModifierList(windowItemModifiers.UTF8String, FALSE); } - tem = [self prefs_get_string:@PREFS_APPKIT_MODIFIERS default:NULL]; - if (tem != NULL) darwinAppKitModMask = DarwinParseModifierList(tem, TRUE); + XQuartzEnableKeyEquivalents = [defaults boolForKey:XQuartzPrefKeyKeyEquivs]; - tem = [self prefs_get_string:@PREFS_WINDOW_ITEM_MODIFIERS default:NULL]; - if (tem != NULL) { - windowItemModMask = DarwinParseModifierList(tem, FALSE); - } - else { - nsstr = NSLocalizedString(@"window item modifiers", - @"window item modifiers"); - if (nsstr != NULL) { - tem = [nsstr UTF8String]; - if ((tem != NULL) && strcmp(tem, "window item modifiers")) { - windowItemModMask = DarwinParseModifierList(tem, FALSE); - } - } - } + darwinSyncKeymap = [defaults boolForKey:XQuartzPrefKeySyncKeymap]; - XQuartzEnableKeyEquivalents = [self prefs_get_boolean:@PREFS_KEYEQUIVS - default : - XQuartzEnableKeyEquivalents]; - - darwinSyncKeymap = [self prefs_get_boolean:@PREFS_SYNC_KEYMAP - default :darwinSyncKeymap]; - - darwinDesiredDepth = [self prefs_get_integer:@PREFS_DEPTH - default :darwinDesiredDepth]; - - noTestExtensions = ![self prefs_get_boolean:@PREFS_TEST_EXTENSIONS - default :FALSE]; - - noRenderExtension = ![self prefs_get_boolean:@PREFS_RENDER_EXTENSION - default :TRUE]; - - XQuartzScrollInDeviceDirection = - [self prefs_get_boolean:@PREFS_SCROLL_IN_DEV_DIRECTION - default : - XQuartzScrollInDeviceDirection]; + darwinDesiredDepth = [defaults integerForKey:XQuartzPrefKeyDepth]; -#if XQUARTZ_SPARKLE - NSURL *url = [self prefs_copy_url:@PREFS_UPDATE_FEED default:nil]; - if (url) { - [[SUUpdater sharedUpdater] setFeedURL:url]; - [url release]; - } -#endif + noTestExtensions = ![defaults boolForKey:XQuartzPrefKeyTESTExtension]; + noRenderExtension = ![defaults boolForKey:XQuartzPrefKeyRENDERExtension]; + + XQuartzScrollInDeviceDirection = [defaults boolForKey:XQuartzPrefKeyScrollInDeviceDirection]; } /* This will end up at the end of the responder chain. */ @@ -1018,8 +647,9 @@ X11ApplicationCanEnterRandR(void) { NSString *title, *msg; + NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; - if ([X11App prefs_get_boolean:@PREFS_NO_RANDR_ALERT default:NO] || + if ([defaults boolForKey:XQuartzPrefKeyNoRANDRAlert] || XQuartzShieldingWindowLevel != 0) return TRUE; @@ -1042,8 +672,7 @@ switch (alert_result) { case NSAlertOtherReturn: - [X11App prefs_set_boolean:@PREFS_NO_RANDR_ALERT value:YES]; - [X11App prefs_synchronize]; + [defaults setBool:YES forKey:XQuartzPrefKeyNoRANDRAlert]; case NSAlertDefaultReturn: return YES; @@ -1058,8 +687,9 @@ { char *tem, buf[1024]; NSString *msg; + NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; - if ([X11App prefs_get_boolean:@PREFS_DONE_XINIT_CHECK default:NO]) + if ([defaults boolForKey:XQuartzPrefKeyDoneXinitCheck]) return; tem = getenv("HOME"); @@ -1093,8 +723,7 @@ } done: - [X11App prefs_set_boolean:@PREFS_DONE_XINIT_CHECK value:YES]; - [X11App prefs_synchronize]; + [defaults setBool:YES forKey:XQuartzPrefKeyDoneXinitCheck]; } static inline pthread_t @@ -1130,15 +759,8 @@ @autoreleasepool { X11App = (X11Application *)[X11Application sharedApplication]; + [X11App read_defaults]; - app_prefs_domain_cfstr = (CFStringRef)[[NSBundle mainBundle] bundleIdentifier]; - - if (app_prefs_domain_cfstr == NULL) { - ErrorF("X11ApplicationMain: Unable to determine bundle identifier. Your installation of XQuartz may be broken.\n"); - app_prefs_domain_cfstr = CFSTR(BUNDLE_ID_PREFIX ".X11"); - } - - [NSApp read_defaults]; [NSBundle loadNibNamed:@"main" owner:NSApp]; [NSNotificationCenter.defaultCenter addObserver:NSApp selector:@selector (became_key:) @@ -1701,8 +1323,17 @@ } if (darwinSyncKeymap) { - TISInputSourceRef key_layout = - TISCopyCurrentKeyboardLayoutInputSource(); + __block TISInputSourceRef key_layout; + dispatch_block_t copyCurrentKeyboardLayoutInputSource = ^{ + key_layout = TISCopyCurrentKeyboardLayoutInputSource(); + }; + /* This is an ugly ant-pattern, but it is more expedient to address the problem right now. */ + if (pthread_main_np()) { + copyCurrentKeyboardLayoutInputSource(); + } else { + dispatch_sync(dispatch_get_main_queue(), copyCurrentKeyboardLayoutInputSource); + } + TISInputSourceRef clear; if (CFEqual(key_layout, last_key_layout)) { CFRelease(key_layout); diff -Nru xorg-server-21.1.3/hw/xquartz/X11Controller.m xorg-server-21.1.4/hw/xquartz/X11Controller.m --- xorg-server-21.1.3/hw/xquartz/X11Controller.m 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/X11Controller.m 2022-07-12 13:27:57.000000000 +0000 @@ -36,6 +36,7 @@ #import "X11Controller.h" #import "X11Application.h" +#import "NSUserDefaults+XQuartzDefaults.h" #include "opaque.h" #include "darwin.h" @@ -61,8 +62,8 @@ @property (nonatomic, readwrite, strong) NSMenuItem *check_for_updates_item; // Programatically enabled #endif -@property (nonatomic, readwrite, strong) NSArray *apps; -@property (nonatomic, readwrite, strong) NSMutableArray *table_apps; +@property (nonatomic, readwrite, strong) NSArray *> *apps; +@property (nonatomic, readwrite, strong) NSMutableArray *> *table_apps; @property (nonatomic, readwrite, assign) NSInteger windows_menu_nitems; @property (nonatomic, readwrite, assign) int checked_window_item; @property (nonatomic, readwrite, assign) x_list *pending_apps; @@ -74,21 +75,19 @@ - (void) awakeFromNib { X11Application *xapp = NSApp; - NSArray *array; /* Point X11Application at ourself. */ xapp.controller = self; - array = [xapp prefs_get_array:@PREFS_APPSMENU]; - if (array != nil) { - int count; + NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; + NSArray *appsMenu = [defaults arrayForKey:XQuartzPrefKeyAppsMenu]; + + if (appsMenu) { + int count = appsMenu.count; /* convert from [TITLE1 COMMAND1 TITLE2 COMMAND2 ...] to [[TITLE1 COMMAND1] [TITLE2 COMMAND2] ...] format. */ - - count = [array count]; - if (count > 0 - && ![[array objectAtIndex:0] isKindOfClass:[NSArray class]]) { + if (count > 0 && ![appsMenu[0] isKindOfClass:NSArray.class]) { int i; NSMutableArray *copy, *sub; @@ -96,24 +95,24 @@ for (i = 0; i < count / 2; i++) { sub = [[NSMutableArray alloc] initWithCapacity:3]; - [sub addObject:[array objectAtIndex:i * 2]]; - [sub addObject:[array objectAtIndex:i * 2 + 1]]; + [sub addObject:appsMenu[i * 2]]; + [sub addObject:appsMenu[i * 2 + 1]]; [sub addObject:@""]; [copy addObject:sub]; [sub release]; } - array = copy; + appsMenu = copy; + [defaults setObject:appsMenu forKey:XQuartzPrefKeyAppsMenu]; } - [self set_apps_menu:array]; + [self set_apps_menu:appsMenu]; } - [[NSNotificationCenter defaultCenter] - addObserver: self - selector: @selector(apps_table_done:) - name: NSWindowWillCloseNotification - object: self.apps_table.window]; + [NSNotificationCenter.defaultCenter addObserver:self + selector:@selector(apps_table_done:) + name:NSWindowWillCloseNotification + object:self.apps_table.window]; } - (void) item_selected:sender @@ -156,10 +155,10 @@ self.apps = nil; } -- (void) prepend_apps_item:(NSArray *)list index:(int)i menu:(NSMenu *)menu +- (void) prepend_apps_item:(NSArray *> *)list index:(int)i menu:(NSMenu *)menu { NSString *title, *shortcut = @""; - NSArray *group; + NSArray *group; NSMenuItem *item; group = [list objectAtIndex:i]; @@ -183,7 +182,7 @@ [item setTag:i + 1]; /* can't be zero, so add one */ } -- (void) install_apps_menu:(NSArray *)list +- (void) install_apps_menu:(NSArray *> *)list { NSMenu *menu; int i, count; @@ -207,7 +206,7 @@ self.apps = list; } -- (void) set_window_menu:(NSArray *)list +- (void) set_window_menu:(NSArray *> *)list { NSMenu * const menu = X11App.windowsMenu; NSMenu * const dock_menu = self.dock_menu; @@ -303,7 +302,7 @@ self.checked_window_item = n; } -- (void) set_apps_menu:(NSArray *)list +- (void) set_apps_menu:(NSArray *> *)list { [self remove_apps_menu]; [self install_apps_menu:list]; @@ -349,9 +348,12 @@ int stdout_pipe[2]; int stderr_pipe[2]; - newargv[0] = [X11App prefs_get_string:@PREFS_LOGIN_SHELL default:"/bin/sh"]; + NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; + NSString * const shell = [defaults stringForKey:XQuartzPrefKeyLoginShell]; + + newargv[0] = shell.fileSystemRepresentation; newargv[1] = "-c"; - newargv[2] = [filename UTF8String]; + newargv[2] = filename.fileSystemRepresentation; newargv[3] = NULL; s = getenv("DISPLAY"); @@ -446,7 +448,7 @@ { int tag; NSString *item; - NSArray * const apps = self.apps; + NSArray *> * const apps = self.apps; tag = [sender tag] - 1; if (apps == nil || tag < 0 || tag >= [apps count]) @@ -460,15 +462,18 @@ - (IBAction) apps_table_show:sender { NSArray *columns; - NSMutableArray *oldapps = self.table_apps; + NSMutableArray *> * const oldapps = self.table_apps; NSTableView * const apps_table = self.apps_table; - NSMutableArray * const table_apps = [[NSMutableArray alloc] initWithCapacity:1]; + NSMutableArray *> * const table_apps = [[NSMutableArray alloc] initWithCapacity:1]; self.table_apps = table_apps; - NSArray * const apps = self.apps; - if (apps != nil) - [table_apps addObjectsFromArray:apps]; + NSArray *> * const apps = self.apps; + if (apps != nil) { + for (NSArray * row in apps) { + [table_apps addObject:row.mutableCopy]; + } + } columns = [apps_table tableColumns]; [[columns objectAtIndex:0] setIdentifier:@"0"]; @@ -487,15 +492,15 @@ - (IBAction) apps_table_done:sender { - NSMutableArray * const table_apps = self.table_apps; + NSMutableArray *> * const table_apps = self.table_apps; NSTableView * const apps_table = self.apps_table; [apps_table deselectAll:sender]; /* flush edits? */ [self remove_apps_menu]; [self install_apps_menu:table_apps]; - [NSApp prefs_set_array:@PREFS_APPSMENU value:table_apps]; - [NSApp prefs_synchronize]; + NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; + [defaults setObject:table_apps forKey:XQuartzPrefKeyAppsMenu]; [[apps_table window] orderOut:sender]; @@ -505,7 +510,7 @@ - (IBAction) apps_table_new:sender { NSMutableArray *item; - NSMutableArray * const table_apps = self.table_apps; + NSMutableArray *> * const table_apps = self.table_apps; NSTableView * const apps_table = self.apps_table; int row = [apps_table selectedRow], i; @@ -534,10 +539,10 @@ - (IBAction) apps_table_duplicate:sender { - NSMutableArray * const table_apps = self.table_apps; + NSMutableArray *> * const table_apps = self.table_apps; NSTableView * const apps_table = self.apps_table; int row = [apps_table selectedRow], i; - NSObject *item; + NSMutableArray *item; if (row < 0) { [self apps_table_new:sender]; @@ -560,7 +565,7 @@ - (IBAction) apps_table_delete:sender { - NSMutableArray * const table_apps = self.table_apps; + NSMutableArray *> * const table_apps = self.table_apps; NSTableView * const apps_table = self.apps_table; int row = [apps_table selectedRow]; @@ -584,7 +589,7 @@ - (NSInteger) numberOfRowsInTableView:(NSTableView *)tableView { - NSMutableArray * const table_apps = self.table_apps; + NSMutableArray *> * const table_apps = self.table_apps; if (table_apps == nil) return 0; return [table_apps count]; @@ -593,7 +598,7 @@ - (id) tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { - NSMutableArray * const table_apps = self.table_apps; + NSMutableArray *> * const table_apps = self.table_apps; NSArray *item; int col; @@ -611,8 +616,8 @@ - (void) tableView:(NSTableView *)tableView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { - NSMutableArray * const table_apps = self.table_apps; - NSMutableArray *item; + NSMutableArray *> * const table_apps = self.table_apps; + NSMutableArray *item; int col; if (table_apps == nil) return; @@ -672,15 +677,15 @@ - (IBAction) enable_fullscreen_changed:sender { - XQuartzRootlessDefault = !self.enable_fullscreen.intValue; + XQuartzRootlessDefault = !self.enable_fullscreen.state; [self.enable_fullscreen_menu setEnabled:!XQuartzRootlessDefault]; [self.enable_fullscreen_menu_text setTextColor:XQuartzRootlessDefault ? NSColor.disabledControlTextColor : NSColor.controlTextColor]; DarwinSendDDXEvent(kXquartzSetRootless, 1, XQuartzRootlessDefault); - [NSApp prefs_set_boolean:@PREFS_ROOTLESS value:XQuartzRootlessDefault]; - [NSApp prefs_synchronize]; + NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; + [defaults setBool:XQuartzRootlessDefault forKey:XQuartzPrefKeyRootless]; } - (IBAction) toggle_fullscreen:sender @@ -693,55 +698,43 @@ if (!sender) return; + NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; + if (sender == self.fake_buttons) { - darwinFakeButtons = self.fake_buttons.intValue; - [NSApp prefs_set_boolean:@PREFS_FAKEBUTTONS value:darwinFakeButtons]; - } - else if (sender == self.enable_keyequivs) { - XQuartzEnableKeyEquivalents = self.enable_keyequivs.intValue; - [NSApp prefs_set_boolean:@PREFS_KEYEQUIVS value: - XQuartzEnableKeyEquivalents]; - } - else if (sender == self.sync_keymap) { - darwinSyncKeymap = self.sync_keymap.intValue; - [NSApp prefs_set_boolean:@PREFS_SYNC_KEYMAP value:darwinSyncKeymap]; - } - else if (sender == self.enable_fullscreen_menu) { - XQuartzFullscreenMenu = self.enable_fullscreen_menu.intValue; - [NSApp prefs_set_boolean:@PREFS_FULLSCREEN_MENU value: - XQuartzFullscreenMenu]; - } - else if (sender == self.option_sends_alt) { + darwinFakeButtons = !!self.fake_buttons.state; + [defaults setBool:darwinFakeButtons forKey:XQuartzPrefKeyFakeButtons]; + } else if (sender == self.enable_keyequivs) { + XQuartzEnableKeyEquivalents = !!self.enable_keyequivs.state; + [defaults setBool:XQuartzEnableKeyEquivalents forKey:XQuartzPrefKeyKeyEquivs]; + } else if (sender == self.sync_keymap) { + darwinSyncKeymap = !!self.sync_keymap.state; + [defaults setBool:darwinSyncKeymap forKey:XQuartzPrefKeySyncKeymap]; + } else if (sender == self.enable_fullscreen_menu) { + XQuartzFullscreenMenu = !!self.enable_fullscreen_menu.state; + [defaults setBool:XQuartzFullscreenMenu forKey:XQuartzPrefKeyFullscreenMenu]; + } else if (sender == self.option_sends_alt) { BOOL prev_opt_sends_alt = XQuartzOptionSendsAlt; - XQuartzOptionSendsAlt = self.option_sends_alt.intValue; - [NSApp prefs_set_boolean:@PREFS_OPTION_SENDS_ALT value: - XQuartzOptionSendsAlt]; + XQuartzOptionSendsAlt = !!self.option_sends_alt.state; + [defaults setBool:XQuartzOptionSendsAlt forKey:XQuartzPrefKeyOptionSendsAlt]; if (prev_opt_sends_alt != XQuartzOptionSendsAlt) QuartsResyncKeymap(TRUE); - } - else if (sender == self.click_through) { - [NSApp prefs_set_boolean:@PREFS_CLICK_THROUGH value:self.click_through.intValue]; - } - else if (sender == self.focus_follows_mouse) { - [NSApp prefs_set_boolean:@PREFS_FFM value:self.focus_follows_mouse.intValue]; - } - else if (sender == self.focus_on_new_window) { - [NSApp prefs_set_boolean:@PREFS_FOCUS_ON_NEW_WINDOW value:self.focus_on_new_window.intValue]; - } - else if (sender == self.enable_auth) { - [NSApp prefs_set_boolean:@PREFS_NO_AUTH value:!self.enable_auth.intValue]; - } - else if (sender == self.enable_tcp) { - [NSApp prefs_set_boolean:@PREFS_NO_TCP value:!self.enable_tcp.intValue]; - } - else if (sender == self.depth) { - [NSApp prefs_set_integer:@PREFS_DEPTH value:self.depth.selectedTag]; - } - else if (sender == self.sync_pasteboard) { + } else if (sender == self.click_through) { + [defaults setBool:!!self.click_through.state forKey:XQuartzPrefKeyClickThrough]; + } else if (sender == self.focus_follows_mouse) { + [defaults setBool:!!self.focus_follows_mouse.state forKey:XQuartzPrefKeyFocusFollowsMouse]; + } else if (sender == self.focus_on_new_window) { + [defaults setBool:!!self.focus_on_new_window.state forKey:XQuartzPrefKeyFocusOnNewWindow]; + } else if (sender == self.enable_auth) { + [defaults setBool:!self.enable_auth.state forKey:XQuartzPrefKeyNoAuth]; + } else if (sender == self.enable_tcp) { + [defaults setBool:!self.enable_tcp.state forKey:XQuartzPrefKeyNoTCP]; + } else if (sender == self.depth) { + [defaults setInteger:self.depth.selectedTag forKey:XQuartzPrefKeyDepth]; + } else if (sender == self.sync_pasteboard) { BOOL pbproxy_active = self.sync_pasteboard.intValue; - [NSApp prefs_set_boolean:@PREFS_SYNC_PB value:pbproxy_active]; + [defaults setBool:pbproxy_active forKey:XQuartzPrefKeySyncPasteboard]; [self.sync_pasteboard_to_clipboard setEnabled:pbproxy_active]; [self.sync_pasteboard_to_primary setEnabled:pbproxy_active]; @@ -751,33 +744,27 @@ // setEnabled doesn't do this... [self.sync_text1 setTextColor:pbproxy_active ? NSColor.controlTextColor : NSColor.disabledControlTextColor]; [self.sync_text2 setTextColor:pbproxy_active ? NSColor.controlTextColor : NSColor.disabledControlTextColor]; + } else if (sender == self.sync_pasteboard_to_clipboard) { + [defaults setBool:!!self.sync_pasteboard_to_clipboard.state forKey:XQuartzPrefKeySyncPasteboardToClipboard]; + } else if (sender == self.sync_pasteboard_to_primary) { + [defaults setBool:!!self.sync_pasteboard_to_primary.state forKey:XQuartzPrefKeySyncPasteboardToPrimary]; + } else if (sender == self.sync_clipboard_to_pasteboard) { + [defaults setBool:!!self.sync_clipboard_to_pasteboard.state forKey:XQuartzPrefKeySyncClipboardToPasteBoard]; + } else if (sender == self.sync_primary_immediately) { + [defaults setBool:!!self.sync_primary_immediately.state forKey:XQuartzPrefKeySyncPrimaryOnSelect]; + } else if (sender == self.scroll_in_device_direction) { + XQuartzScrollInDeviceDirection = !!self.scroll_in_device_direction.state; + [defaults setBool:XQuartzScrollInDeviceDirection forKey:XQuartzPrefKeyScrollInDeviceDirection]; } - else if (sender == self.sync_pasteboard_to_clipboard) { - [NSApp prefs_set_boolean:@PREFS_SYNC_PB_TO_CLIPBOARD value:self.sync_pasteboard_to_clipboard.intValue]; - } - else if (sender == self.sync_pasteboard_to_primary) { - [NSApp prefs_set_boolean:@PREFS_SYNC_PB_TO_PRIMARY value:self.sync_pasteboard_to_primary.intValue]; - } - else if (sender == self.sync_clipboard_to_pasteboard) { - [NSApp prefs_set_boolean:@PREFS_SYNC_CLIPBOARD_TO_PB value:self.sync_clipboard_to_pasteboard.intValue]; - } - else if (sender == self.sync_primary_immediately) { - [NSApp prefs_set_boolean:@PREFS_SYNC_PRIMARY_ON_SELECT value:self.sync_primary_immediately.intValue]; - } - else if (sender == self.scroll_in_device_direction) { - XQuartzScrollInDeviceDirection = self.scroll_in_device_direction.intValue; - [NSApp prefs_set_boolean:@PREFS_SCROLL_IN_DEV_DIRECTION value:XQuartzScrollInDeviceDirection]; - } - - [NSApp prefs_synchronize]; DarwinSendDDXEvent(kXquartzReloadPreferences, 0); } - (IBAction) prefs_show:sender { - BOOL pbproxy_active = - [NSApp prefs_get_boolean:@PREFS_SYNC_PB default:YES]; + NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; + + BOOL pbproxy_active = [defaults boolForKey:XQuartzPrefKeySyncPasteboard]; [self.scroll_in_device_direction setIntValue:XQuartzScrollInDeviceDirection]; @@ -785,20 +772,20 @@ [self.enable_keyequivs setIntValue:XQuartzEnableKeyEquivalents]; [self.sync_keymap setIntValue:darwinSyncKeymap]; [self.option_sends_alt setIntValue:XQuartzOptionSendsAlt]; - [self.click_through setIntValue:[NSApp prefs_get_boolean:@PREFS_CLICK_THROUGH default:NO]]; - [self.focus_follows_mouse setIntValue:[NSApp prefs_get_boolean:@PREFS_FFM default:NO]]; - [self.focus_on_new_window setIntValue:[NSApp prefs_get_boolean:@PREFS_FOCUS_ON_NEW_WINDOW default:YES]]; + [self.click_through setIntValue:[defaults boolForKey:XQuartzPrefKeyClickThrough]]; + [self.focus_follows_mouse setIntValue:[defaults boolForKey:XQuartzPrefKeyFocusFollowsMouse]]; + [self.focus_on_new_window setIntValue:[defaults boolForKey:XQuartzPrefKeyFocusOnNewWindow]]; - [self.enable_auth setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_AUTH default:NO]]; - [self.enable_tcp setIntValue:![NSApp prefs_get_boolean:@PREFS_NO_TCP default:NO]]; + [self.enable_auth setIntValue:![defaults boolForKey:XQuartzPrefKeyNoAuth]]; + [self.enable_tcp setIntValue:![defaults boolForKey:XQuartzPrefKeyNoTCP]]; - [self.depth selectItemAtIndex:[self.depth indexOfItemWithTag:[NSApp prefs_get_integer:@PREFS_DEPTH default:-1]]]; + [self.depth selectItemAtIndex:[self.depth indexOfItemWithTag:[defaults integerForKey:XQuartzPrefKeyDepth]]]; [self.sync_pasteboard setIntValue:pbproxy_active]; - [self.sync_pasteboard_to_clipboard setIntValue:[NSApp prefs_get_boolean:@PREFS_SYNC_PB_TO_CLIPBOARD default:YES]]; - [self.sync_pasteboard_to_primary setIntValue:[NSApp prefs_get_boolean:@PREFS_SYNC_PB_TO_PRIMARY default:YES]]; - [self.sync_clipboard_to_pasteboard setIntValue:[NSApp prefs_get_boolean:@PREFS_SYNC_CLIPBOARD_TO_PB default:YES]]; - [self.sync_primary_immediately setIntValue:[NSApp prefs_get_boolean:@PREFS_SYNC_PRIMARY_ON_SELECT default:NO]]; + [self.sync_pasteboard_to_clipboard setIntValue:[defaults boolForKey:XQuartzPrefKeySyncPasteboardToClipboard]]; + [self.sync_pasteboard_to_primary setIntValue:[defaults boolForKey:XQuartzPrefKeySyncPasteboardToPrimary]]; + [self.sync_clipboard_to_pasteboard setIntValue:[defaults boolForKey:XQuartzPrefKeySyncClipboardToPasteBoard]]; + [self.sync_primary_immediately setIntValue:[defaults boolForKey:XQuartzPrefKeySyncPrimaryOnSelect]]; [self.sync_pasteboard_to_clipboard setEnabled:pbproxy_active]; [self.sync_pasteboard_to_primary setEnabled:pbproxy_active]; @@ -863,9 +850,11 @@ NSString *msg; NSString *title; - if (self.can_quit || - [X11App prefs_get_boolean:@PREFS_NO_QUIT_ALERT default:NO]) + NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; + + if (self.can_quit || [defaults boolForKey:XQuartzPrefKeyNoQuitAlert]) { return NSTerminateNow; + } /* Make sure we're frontmost. */ [NSApp activateIgnoringOtherApps:YES]; @@ -887,8 +876,6 @@ - (void) applicationWillTerminate:(NSNotification *)aNotification _X_NORETURN { - [X11App prefs_synchronize]; - /* shutdown the X server, it will exit () for us. */ DarwinSendDDXEvent(kXquartzQuit, 0); diff -Nru xorg-server-21.1.3/hw/xquartz/bundle/Info.plist.cpp xorg-server-21.1.4/hw/xquartz/bundle/Info.plist.cpp --- xorg-server-21.1.3/hw/xquartz/bundle/Info.plist.cpp 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/bundle/Info.plist.cpp 2022-07-12 13:27:57.000000000 +0000 @@ -28,20 +28,45 @@ NSSupportsAutomaticGraphicsSwitching + + + NSAppleEventsUsageDescription + A process launched by APPLE_APPLICATION_NAME wants to use AppleScript. + NSCalendarsUsageDescription + A process launched by APPLE_APPLICATION_NAME wants access to your calendar data. + NSCameraUsageDescription + A process launched by APPLE_APPLICATION_NAME wants access to your camera. + NSContactsUsageDescription + A process launched by APPLE_APPLICATION_NAME wants access to your contacts. + NSLocationAlwaysUsageDescription + A process launched by APPLE_APPLICATION_NAME wants access to your location information, even when not in use. + NSLocationUsageDescription + A process launched by APPLE_APPLICATION_NAME wants access to your location information. + NSLocationWhenInUseUsageDescription + A process launched by APPLE_APPLICATION_NAME wants access to your location information when in use. + NSMicrophoneUsageDescription + A process launched by APPLE_APPLICATION_NAME wants access to your microphone. + NSRemindersUsageDescription + A process launched by APPLE_APPLICATION_NAME wants access to your reminders. + NSSystemAdministrationUsageDescription + A process launched by APPLE_APPLICATION_NAME wants admin privileges. + #ifdef XQUARTZ_SPARKLE SUEnableAutomaticChecks - SUPublicDSAKeyFile - sparkle.pem + SUPublicEDKey + XQUARTZ_SPARKLE_PUBLIC_EDKEY SUFeedURL XQUARTZ_SPARKLE_FEED_URL #endif LSApplicationCategoryType public.app-category.utilities NSHumanReadableCopyright - © 2003-2021 Apple Inc. + © 2003-2022 Apple Inc. © 2003 XFree86 Project, Inc. -© 2003-2021 X.org Foundation, Inc. +© 2003-2022 X.org Foundation, Inc. NSMainNibFile main diff -Nru xorg-server-21.1.3/hw/xquartz/bundle/Makefile.am xorg-server-21.1.4/hw/xquartz/bundle/Makefile.am --- xorg-server-21.1.3/hw/xquartz/bundle/Makefile.am 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/bundle/Makefile.am 2022-07-12 13:27:57.000000000 +0000 @@ -23,10 +23,8 @@ CLEANFILES = $(noinst_DATA) -resourcedir=$(libdir)/X11/xserver -resource_DATA = Xquartz.plist - EXTRA_DIST = \ + chown-bundle.sh \ mk_bundke.sh \ X11.sh \ Info.plist.cpp \ @@ -181,5 +179,5 @@ Resources/zh_TW.lproj/Localizable.strings \ Resources/zh_TW.lproj/locversion.plist \ Resources/zh_TW.lproj/main.nib/designable.nib \ - Resources/zh_TW.lproj/main.nib/keyedobjects.nib + Resources/zh_TW.lproj/main.nib/keyedobjects.nib \ Resources/zh_TW.lproj/main.nib/keyedobjects-110000.nib diff -Nru xorg-server-21.1.3/hw/xquartz/bundle/Makefile.in xorg-server-21.1.4/hw/xquartz/bundle/Makefile.in --- xorg-server-21.1.3/hw/xquartz/bundle/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/bundle/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -135,35 +135,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(resourcedir)" -DATA = $(noinst_DATA) $(resource_DATA) +DATA = $(noinst_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/cpprules.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -511,9 +483,8 @@ noinst_PRE = Info.plist.cpp noinst_DATA = $(noinst_PRE:plist.cpp=plist) CLEANFILES = $(noinst_DATA) -resourcedir = $(libdir)/X11/xserver -resource_DATA = Xquartz.plist EXTRA_DIST = \ + chown-bundle.sh \ mk_bundke.sh \ X11.sh \ Info.plist.cpp \ @@ -668,7 +639,8 @@ Resources/zh_TW.lproj/Localizable.strings \ Resources/zh_TW.lproj/locversion.plist \ Resources/zh_TW.lproj/main.nib/designable.nib \ - Resources/zh_TW.lproj/main.nib/keyedobjects.nib + Resources/zh_TW.lproj/main.nib/keyedobjects.nib \ + Resources/zh_TW.lproj/main.nib/keyedobjects-110000.nib all: all-am @@ -710,27 +682,6 @@ clean-libtool: -rm -rf .libs _libs -install-resourceDATA: $(resource_DATA) - @$(NORMAL_INSTALL) - @list='$(resource_DATA)'; test -n "$(resourcedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(resourcedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(resourcedir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(resourcedir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(resourcedir)" || exit $$?; \ - done - -uninstall-resourceDATA: - @$(NORMAL_UNINSTALL) - @list='$(resource_DATA)'; test -n "$(resourcedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(resourcedir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: @@ -775,9 +726,6 @@ check: check-am all-am: Makefile $(DATA) installdirs: - for dir in "$(DESTDIR)$(resourcedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -829,7 +777,7 @@ info-am: -install-data-am: install-resourceDATA +install-data-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am @@ -874,7 +822,7 @@ ps-am: -uninstall-am: uninstall-resourceDATA +uninstall-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: install-am install-data-am install-strip uninstall-am @@ -886,11 +834,11 @@ install-data-hook install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-resourceDATA install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ - uninstall-am uninstall-hook uninstall-resourceDATA + uninstall-am uninstall-hook .PRECIOUS: Makefile @@ -905,7 +853,6 @@ $(RM) -rf $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app/Contents/Resources $(RM) -rf $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app/Contents/Info.plist $(RM) -rf $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app/Contents/PkgInfo - Resources/zh_TW.lproj/main.nib/keyedobjects-110000.nib # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. Binary files /tmp/tmpuwf6l_kj/hbpQGhDV1g/xorg-server-21.1.3/hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/keyedobjects-110000.nib and /tmp/tmpuwf6l_kj/DPXmgBxvek/xorg-server-21.1.4/hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/keyedobjects-110000.nib differ diff -Nru xorg-server-21.1.3/hw/xquartz/bundle/Xquartz.plist xorg-server-21.1.4/hw/xquartz/bundle/Xquartz.plist --- xorg-server-21.1.3/hw/xquartz/bundle/Xquartz.plist 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/bundle/Xquartz.plist 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ - - - - - - - - apps_menu - - - Terminal - xterm - n - - - xman - xman - - - - xlogo - xlogo - - - - - diff -Nru xorg-server-21.1.3/hw/xquartz/bundle/meson.build xorg-server-21.1.4/hw/xquartz/bundle/meson.build --- xorg-server-21.1.3/hw/xquartz/bundle/meson.build 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/bundle/meson.build 2022-07-12 13:27:57.000000000 +0000 @@ -10,10 +10,7 @@ ] if build_sparkle -cpp_defs += [ - '-DXQUARTZ_SPARKLE', - '-DXQUARTZ_SPARKLE_FEED_URL=@0@'.format(xquartz_sparkle_feed_url), -] +cpp_defs += sparkle_defs endif # bundle data @@ -56,7 +53,6 @@ install_mode: 'rw-r--r--') install_data('X11.sh', - rename: 'X11', install_dir: join_paths(bundle_root, 'Contents/MacOS'), install_mode: 'rwxr-xr-x') diff -Nru xorg-server-21.1.3/hw/xquartz/mach-startup/Makefile.in xorg-server-21.1.4/hw/xquartz/mach-startup/Makefile.in --- xorg-server-21.1.3/hw/xquartz/mach-startup/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/mach-startup/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -893,7 +893,8 @@ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am +install-exec: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -1005,7 +1006,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-x11appPROGRAMS -.MAKE: all check install install-am install-strip +.MAKE: all check install install-am install-exec install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool \ diff -Nru xorg-server-21.1.3/hw/xquartz/mach-startup/meson.build xorg-server-21.1.4/hw/xquartz/mach-startup/meson.build --- xorg-server-21.1.3/hw/xquartz/mach-startup/meson.build 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/mach-startup/meson.build 2022-07-12 13:27:57.000000000 +0000 @@ -70,6 +70,17 @@ install_dir: x11appdir, ) +# X11 (Bundle trampoline) +x11 = executable('X11', + [ + 'bundle_trampoline.c', + ], + c_args: xquartz_defs, + link_args: ['-Objc'], + install: true, + install_dir: x11appdir, +) + # Xquartz xquartz_deps = [ dependency('CoreServices', method: 'extraframework'), diff -Nru xorg-server-21.1.3/hw/xquartz/man/Makefile.in xorg-server-21.1.4/hw/xquartz/man/Makefile.in --- xorg-server-21.1.3/hw/xquartz/man/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/man/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xquartz/meson.build xorg-server-21.1.4/hw/xquartz/meson.build --- xorg-server-21.1.3/hw/xquartz/meson.build 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/meson.build 2022-07-12 13:27:57.000000000 +0000 @@ -4,22 +4,43 @@ apple_application_name = get_option('apple-application-name') bundle_id_prefix = get_option('bundle-id-prefix') xquartz_sparkle_feed_url = get_option('sparkle-feed-url') +xquartz_sparkle_public_edkey = get_option('sparkle-public-edkey') -bundle_version_string = meson.project_version() # CFBundleShortVersionString -bundle_version = release # CFBundleVersion +bundle_version_string = get_option('bundle-version-string') # CFBundleShortVersionString +if bundle_version_string == 'auto' + bundle_version_string = meson.project_version() +endif + +bundle_version = get_option('bundle-version') # CFBundleVersion +if bundle_version == 'auto' + version_arr = bundle_version_string.split('.') + version_major = version_arr[0].to_int() + version_minor = version_arr[1].to_int() + version_tiny = version_arr[2].to_int() + bundle_version = '@0@.@1@.@2@'.format(version_major, version_minor, version_tiny) +endif bundle_id_def = '-DBUNDLE_ID_PREFIX="@0@"'.format(bundle_id_prefix) bundle_root = join_paths(apple_applications_dir, apple_application_name + '.app') # using sparkle update framework? -build_sparkle = xquartz_sparkle_feed_url != '' +build_sparkle = xquartz_sparkle_feed_url != '' and xquartz_sparkle_public_edkey != '' if build_sparkle sparkle = dependency('Sparkle', method: 'extraframework') + + sparkle_defs = [ + '-DXQUARTZ_SPARKLE', + '-DXQUARTZ_SPARKLE_FEED_URL=@0@'.format(xquartz_sparkle_feed_url), + '-DXQUARTZ_SPARKLE_PUBLIC_EDKEY=@0@'.format(xquartz_sparkle_public_edkey), + ] +else + sparkle_defs = [] endif # libxquartz srcs_libxquartz = [ + 'NSUserDefaults+XQuartzDefaults.m', 'X11Application.m', 'X11Controller.m', 'applewm.c', @@ -43,6 +64,7 @@ '-DXQUARTZ', '-DXSERVER_VERSION="@0@"'.format(meson.project_version()), bundle_id_def, + sparkle_defs, ] if cc.has_function('dispatch_async') diff -Nru xorg-server-21.1.3/hw/xquartz/pbproxy/Makefile.am xorg-server-21.1.4/hw/xquartz/pbproxy/Makefile.am --- xorg-server-21.1.3/hw/xquartz/pbproxy/Makefile.am 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/pbproxy/Makefile.am 2022-07-12 13:27:57.000000000 +0000 @@ -1,4 +1,4 @@ -AM_CPPFLAGS=-DBUNDLE_ID_PREFIX=\"$(BUNDLE_ID_PREFIX)\" +AM_CPPFLAGS=-I.. AM_CFLAGS=$(XPBPROXY_CFLAGS) AM_OBJCFLAGS=$(XPBPROXY_CFLAGS) @@ -15,7 +15,7 @@ if STANDALONE_XPBPROXY bin_PROGRAMS = xpbproxy -xpbproxy_SOURCES = app-main.m +xpbproxy_SOURCES = app-main.m ../NSUserDefaults+XQuartzDefaults.m xpbproxy_LDADD = libxpbproxy.la xpbproxy_LDFLAGS = -Wl,-framework,Cocoa diff -Nru xorg-server-21.1.3/hw/xquartz/pbproxy/Makefile.in xorg-server-21.1.4/hw/xquartz/pbproxy/Makefile.in --- xorg-server-21.1.3/hw/xquartz/pbproxy/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/pbproxy/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -125,8 +125,10 @@ libxpbproxy_la_LINK = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(OBJCLD) $(AM_OBJCFLAGS) \ $(OBJCFLAGS) $(libxpbproxy_la_LDFLAGS) $(LDFLAGS) -o $@ -am__xpbproxy_SOURCES_DIST = app-main.m -@STANDALONE_XPBPROXY_TRUE@am_xpbproxy_OBJECTS = app-main.$(OBJEXT) +am__xpbproxy_SOURCES_DIST = app-main.m \ + ../NSUserDefaults+XQuartzDefaults.m +@STANDALONE_XPBPROXY_TRUE@am_xpbproxy_OBJECTS = app-main.$(OBJEXT) \ +@STANDALONE_XPBPROXY_TRUE@ NSUserDefaults+XQuartzDefaults.$(OBJEXT) xpbproxy_OBJECTS = $(am_xpbproxy_OBJECTS) @STANDALONE_XPBPROXY_TRUE@xpbproxy_DEPENDENCIES = libxpbproxy.la xpbproxy_LINK = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ @@ -147,7 +149,8 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/app-main.Po ./$(DEPDIR)/main.Plo \ +am__depfiles_remade = ./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Po \ + ./$(DEPDIR)/app-main.Po ./$(DEPDIR)/main.Plo \ ./$(DEPDIR)/trick_autotools.Plo ./$(DEPDIR)/x-input.Plo \ ./$(DEPDIR)/x-selection.Plo am__mv = mv -f @@ -538,8 +541,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AM_CPPFLAGS = -DBUNDLE_ID_PREFIX=\"$(BUNDLE_ID_PREFIX)\" \ - $(am__append_1) +AM_CPPFLAGS = -I.. $(am__append_1) AM_CFLAGS = $(XPBPROXY_CFLAGS) AM_OBJCFLAGS = $(XPBPROXY_CFLAGS) noinst_LTLIBRARIES = libxpbproxy.la @@ -550,7 +552,7 @@ x-selection.m libxpbproxy_la_LDFLAGS = $(XPBPROXY_LIBS) -@STANDALONE_XPBPROXY_TRUE@xpbproxy_SOURCES = app-main.m +@STANDALONE_XPBPROXY_TRUE@xpbproxy_SOURCES = app-main.m ../NSUserDefaults+XQuartzDefaults.m @STANDALONE_XPBPROXY_TRUE@xpbproxy_LDADD = libxpbproxy.la @STANDALONE_XPBPROXY_TRUE@xpbproxy_LDFLAGS = -Wl,-framework,Cocoa EXTRA_DIST = \ @@ -664,6 +666,7 @@ distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/app-main.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trick_autotools.Plo@am__quote@ # am--include-marker @@ -718,6 +721,20 @@ @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepOBJC_FALSE@ $(AM_V_OBJC@am__nodep@)$(LTOBJCCOMPILE) -c -o $@ $< +NSUserDefaults+XQuartzDefaults.o: ../NSUserDefaults+XQuartzDefaults.m +@am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT NSUserDefaults+XQuartzDefaults.o -MD -MP -MF $(DEPDIR)/NSUserDefaults+XQuartzDefaults.Tpo -c -o NSUserDefaults+XQuartzDefaults.o `test -f '../NSUserDefaults+XQuartzDefaults.m' || echo '$(srcdir)/'`../NSUserDefaults+XQuartzDefaults.m +@am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NSUserDefaults+XQuartzDefaults.Tpo $(DEPDIR)/NSUserDefaults+XQuartzDefaults.Po +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ $(AM_V_OBJC)source='../NSUserDefaults+XQuartzDefaults.m' object='NSUserDefaults+XQuartzDefaults.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(AM_V_OBJC@am__nodep@)$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o NSUserDefaults+XQuartzDefaults.o `test -f '../NSUserDefaults+XQuartzDefaults.m' || echo '$(srcdir)/'`../NSUserDefaults+XQuartzDefaults.m + +NSUserDefaults+XQuartzDefaults.obj: ../NSUserDefaults+XQuartzDefaults.m +@am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT NSUserDefaults+XQuartzDefaults.obj -MD -MP -MF $(DEPDIR)/NSUserDefaults+XQuartzDefaults.Tpo -c -o NSUserDefaults+XQuartzDefaults.obj `if test -f '../NSUserDefaults+XQuartzDefaults.m'; then $(CYGPATH_W) '../NSUserDefaults+XQuartzDefaults.m'; else $(CYGPATH_W) '$(srcdir)/../NSUserDefaults+XQuartzDefaults.m'; fi` +@am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NSUserDefaults+XQuartzDefaults.Tpo $(DEPDIR)/NSUserDefaults+XQuartzDefaults.Po +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ $(AM_V_OBJC)source='../NSUserDefaults+XQuartzDefaults.m' object='NSUserDefaults+XQuartzDefaults.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepOBJC_FALSE@ $(AM_V_OBJC@am__nodep@)$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o NSUserDefaults+XQuartzDefaults.obj `if test -f '../NSUserDefaults+XQuartzDefaults.m'; then $(CYGPATH_W) '../NSUserDefaults+XQuartzDefaults.m'; else $(CYGPATH_W) '$(srcdir)/../NSUserDefaults+XQuartzDefaults.m'; fi` + mostlyclean-libtool: -rm -f *.lo @@ -852,7 +869,8 @@ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am - -rm -f ./$(DEPDIR)/app-main.Po + -rm -f ./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Po + -rm -f ./$(DEPDIR)/app-main.Po -rm -f ./$(DEPDIR)/main.Plo -rm -f ./$(DEPDIR)/trick_autotools.Plo -rm -f ./$(DEPDIR)/x-input.Plo @@ -902,7 +920,8 @@ installcheck-am: maintainer-clean: maintainer-clean-am - -rm -f ./$(DEPDIR)/app-main.Po + -rm -f ./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Po + -rm -f ./$(DEPDIR)/app-main.Po -rm -f ./$(DEPDIR)/main.Plo -rm -f ./$(DEPDIR)/trick_autotools.Plo -rm -f ./$(DEPDIR)/x-input.Plo diff -Nru xorg-server-21.1.3/hw/xquartz/pbproxy/app-main.m xorg-server-21.1.4/hw/xquartz/pbproxy/app-main.m --- xorg-server-21.1.3/hw/xquartz/pbproxy/app-main.m 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/pbproxy/app-main.m 2022-07-12 13:27:57.000000000 +0000 @@ -31,13 +31,6 @@ #include "pbproxy.h" #import "x-selection.h" -#include -#include /*for getpid*/ -#include - -static const char *app_prefs_domain = BUNDLE_ID_PREFIX ".xpbproxy"; -CFStringRef app_prefs_domain_cfstr; - /* Stubs */ char *display = NULL; @@ -82,41 +75,8 @@ int main(int argc, const char *argv[]) { - const char *s; - int i; - -#ifdef DEBUG - ErrorF("pid: %u\n", getpid()); -#endif - xpbproxy_is_standalone = YES; - if ((s = getenv("X11_PREFS_DOMAIN"))) - app_prefs_domain = s; - - for (i = 1; i < argc; i++) { - if (strcmp(argv[i], "--prefs-domain") == 0 && i + 1 < argc) { - app_prefs_domain = argv[++i]; - } - else if (strcmp(argv[i], "--help") == 0) { - ErrorF( - "usage: xpbproxy OPTIONS\n" - "Pasteboard proxying for X11.\n\n" - "--prefs-domain Change the domain used for reading preferences\n" - " (default: %s)\n", - app_prefs_domain); - return 0; - } - else { - ErrorF("usage: xpbproxy OPTIONS...\n" - "Try 'xpbproxy --help' for more information.\n"); - return 1; - } - } - - app_prefs_domain_cfstr = CFStringCreateWithCString(NULL, app_prefs_domain, - kCFStringEncodingUTF8); - signal(SIGINT, signal_handler); signal(SIGTERM, signal_handler); signal(SIGHUP, signal_handler); diff -Nru xorg-server-21.1.3/hw/xquartz/pbproxy/meson.build xorg-server-21.1.4/hw/xquartz/pbproxy/meson.build --- xorg-server-21.1.3/hw/xquartz/pbproxy/meson.build 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/pbproxy/meson.build 2022-07-12 13:27:57.000000000 +0000 @@ -8,9 +8,11 @@ libapplewm_dep = dependency('applewm', version: '>=1.4') libxpbproxy = static_library('xpbproxy', - ['main.m', + ['../NSUserDefaults+XQuartzDefaults.m', + 'main.m', 'x-input.m', 'x-selection.m'], + include_directories: ['..'], dependencies: [applewmproto_dep, libapplewm_dep, dependency('xfixes'), dependency('x11')], objc_args: pbproxy_defs, ) diff -Nru xorg-server-21.1.3/hw/xquartz/pbproxy/x-selection.m xorg-server-21.1.4/hw/xquartz/pbproxy/x-selection.m --- xorg-server-21.1.3/hw/xquartz/pbproxy/x-selection.m 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/pbproxy/x-selection.m 2022-07-12 13:27:57.000000000 +0000 @@ -38,6 +38,8 @@ #import #import +#import "NSUserDefaults+XQuartzDefaults.h" + /* * The basic design of the pbproxy code is as follows. * @@ -99,18 +101,6 @@ } #endif -extern CFStringRef app_prefs_domain_cfstr; - -static BOOL -prefs_get_bool(CFStringRef key, BOOL defaultValue) -{ - Boolean value, ok; - - value = CFPreferencesGetAppBooleanValue(key, app_prefs_domain_cfstr, &ok); - - return ok ? (BOOL)value : defaultValue; -} - static void init_propdata(struct propdata *pdata) { @@ -1394,35 +1384,18 @@ - (void) reload_preferences { - /* - * It's uncertain how we could handle the synchronization failing, so cast to void. - * The prefs_get_bool should fall back to defaults if the org.x.X11 plist doesn't exist or is invalid. - */ - (void)CFPreferencesAppSynchronize(app_prefs_domain_cfstr); + NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; + #ifdef STANDALONE_XPBPROXY if (xpbproxy_is_standalone) pbproxy_prefs.active = YES; else #endif - pbproxy_prefs.active = prefs_get_bool(CFSTR( - "sync_pasteboard"), - pbproxy_prefs.active); - pbproxy_prefs.primary_on_grab = - prefs_get_bool(CFSTR( - "sync_primary_on_select"), - pbproxy_prefs.primary_on_grab); - pbproxy_prefs.clipboard_to_pasteboard = - prefs_get_bool(CFSTR( - "sync_clipboard_to_pasteboard"), - pbproxy_prefs.clipboard_to_pasteboard); - pbproxy_prefs.pasteboard_to_primary = - prefs_get_bool(CFSTR( - "sync_pasteboard_to_primary"), - pbproxy_prefs.pasteboard_to_primary); - pbproxy_prefs.pasteboard_to_clipboard = - prefs_get_bool(CFSTR( - "sync_pasteboard_to_clipboard"), - pbproxy_prefs.pasteboard_to_clipboard); + pbproxy_prefs.active = [defaults boolForKey:XQuartzPrefKeySyncPasteboard]; + pbproxy_prefs.primary_on_grab = [defaults boolForKey:XQuartzPrefKeySyncPrimaryOnSelect]; + pbproxy_prefs.clipboard_to_pasteboard = [defaults boolForKey:XQuartzPrefKeySyncClipboardToPasteBoard]; + pbproxy_prefs.pasteboard_to_primary = [defaults boolForKey:XQuartzPrefKeySyncPasteboardToPrimary]; + pbproxy_prefs.pasteboard_to_clipboard = [defaults boolForKey:XQuartzPrefKeySyncPasteboardToClipboard]; /* This is used for debugging. */ //dump_prefs(); diff -Nru xorg-server-21.1.3/hw/xquartz/quartz.c xorg-server-21.1.4/hw/xquartz/quartz.c --- xorg-server-21.1.3/hw/xquartz/quartz.c 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/quartz.c 2022-07-12 13:27:57.000000000 +0000 @@ -85,14 +85,16 @@ QuartzModeProcsPtr quartzProcs = NULL; const char *quartzOpenGLBundle = NULL; -Bool XQuartzFullscreenDisableHotkeys = TRUE; -Bool XQuartzOptionSendsAlt = FALSE; -Bool XQuartzEnableKeyEquivalents = TRUE; +/* These are initialized by X11Application with default values set in NSUserDefaults+XQuartzDefaults */ +Bool XQuartzFullscreenDisableHotkeys; +Bool XQuartzOptionSendsAlt; +Bool XQuartzEnableKeyEquivalents; +Bool XQuartzFullscreenMenu; +Bool XQuartzRootlessDefault; + Bool XQuartzFullscreenVisible = FALSE; -Bool XQuartzRootlessDefault = TRUE; Bool XQuartzIsRootless = TRUE; Bool XQuartzServerVisible = FALSE; -Bool XQuartzFullscreenMenu = FALSE; int32_t XQuartzShieldingWindowLevel = 0; diff -Nru xorg-server-21.1.3/hw/xquartz/xpr/Makefile.in xorg-server-21.1.4/hw/xquartz/xpr/Makefile.in --- xorg-server-21.1.3/hw/xquartz/xpr/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/hw/xquartz/xpr/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xwin/Makefile.in xorg-server-21.1.4/hw/xwin/Makefile.in --- xorg-server-21.1.3/hw/xwin/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/hw/xwin/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1159,7 +1159,8 @@ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive -install-exec: install-exec-recursive +install-exec: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive @@ -1355,7 +1356,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-xwinconfigDATA .MAKE: $(am__recursive_targets) all check install install-am \ - install-exec-am install-strip + install-exec install-exec-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles check check-am clean clean-binPROGRAMS \ diff -Nru xorg-server-21.1.3/hw/xwin/dri/Makefile.in xorg-server-21.1.4/hw/xwin/dri/Makefile.in --- xorg-server-21.1.3/hw/xwin/dri/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/hw/xwin/dri/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xwin/glx/Makefile.in xorg-server-21.1.4/hw/xwin/glx/Makefile.in --- xorg-server-21.1.3/hw/xwin/glx/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/hw/xwin/glx/Makefile.in 2022-07-12 13:28:12.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -812,7 +812,8 @@ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am +install-exec: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -924,7 +925,7 @@ uninstall-am: uninstall-libLTLIBRARIES -.MAKE: all check install install-am install-strip +.MAKE: all check install install-am install-exec install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool \ diff -Nru xorg-server-21.1.3/hw/xwin/man/Makefile.in xorg-server-21.1.4/hw/xwin/man/Makefile.in --- xorg-server-21.1.3/hw/xwin/man/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/hw/xwin/man/Makefile.in 2022-07-12 13:28:13.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xwin/winclipboard/Makefile.in xorg-server-21.1.4/hw/xwin/winclipboard/Makefile.in --- xorg-server-21.1.3/hw/xwin/winclipboard/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/hw/xwin/winclipboard/Makefile.in 2022-07-12 13:28:13.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/hw/xwin/winprefsyacc.c xorg-server-21.1.4/hw/xwin/winprefsyacc.c --- xorg-server-21.1.3/hw/xwin/winprefsyacc.c 2022-01-02 22:42:36.000000000 +0000 +++ xorg-server-21.1.4/hw/xwin/winprefsyacc.c 2022-07-12 13:28:38.000000000 +0000 @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.5.1. */ +/* A Bison parser, made by GNU Bison 3.7.5. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -34,6 +34,10 @@ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ + /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. @@ -41,14 +45,11 @@ define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ -/* Undocumented macros, especially those whose name start with YY_, - are private implementation details. Do not rely on them. */ - -/* Identify Bison output. */ -#define YYBISON 1 +/* Identify Bison output, and Bison version. */ +#define YYBISON 30705 -/* Bison version. */ -#define YYBISON_VERSION "3.5.1" +/* Bison version string. */ +#define YYBISON_VERSION "3.7.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -155,7 +156,7 @@ extern int yylex(void); -#line 159 "winprefsyacc.c" +#line 160 "winprefsyacc.c" # ifndef YY_CAST # ifdef __cplusplus @@ -178,14 +179,6 @@ # endif # endif -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - /* Use api.header.include to #include this header instead of duplicating it here. */ #ifndef YY_YY_WINPREFSYACC_H_INCLUDED @@ -198,43 +191,52 @@ extern int yydebug; #endif -/* Token type. */ +/* Token kinds. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { - NEWLINE = 258, - MENU = 259, - LB = 260, - RB = 261, - ICONDIRECTORY = 262, - DEFAULTICON = 263, - ICONS = 264, - STYLES = 265, - TOPMOST = 266, - MAXIMIZE = 267, - MINIMIZE = 268, - BOTTOM = 269, - NOTITLE = 270, - OUTLINE = 271, - NOFRAME = 272, - DEFAULTSYSMENU = 273, - SYSMENU = 274, - ROOTMENU = 275, - SEPARATOR = 276, - ATSTART = 277, - ATEND = 278, - EXEC = 279, - ALWAYSONTOP = 280, - DEBUGOUTPUT = 281, - RELOAD = 282, - TRAYICON = 283, - FORCEEXIT = 284, - SILENTEXIT = 285, - STRING = 286 + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + NEWLINE = 258, /* NEWLINE */ + MENU = 259, /* MENU */ + LB = 260, /* LB */ + RB = 261, /* RB */ + ICONDIRECTORY = 262, /* ICONDIRECTORY */ + DEFAULTICON = 263, /* DEFAULTICON */ + ICONS = 264, /* ICONS */ + STYLES = 265, /* STYLES */ + TOPMOST = 266, /* TOPMOST */ + MAXIMIZE = 267, /* MAXIMIZE */ + MINIMIZE = 268, /* MINIMIZE */ + BOTTOM = 269, /* BOTTOM */ + NOTITLE = 270, /* NOTITLE */ + OUTLINE = 271, /* OUTLINE */ + NOFRAME = 272, /* NOFRAME */ + DEFAULTSYSMENU = 273, /* DEFAULTSYSMENU */ + SYSMENU = 274, /* SYSMENU */ + ROOTMENU = 275, /* ROOTMENU */ + SEPARATOR = 276, /* SEPARATOR */ + ATSTART = 277, /* ATSTART */ + ATEND = 278, /* ATEND */ + EXEC = 279, /* EXEC */ + ALWAYSONTOP = 280, /* ALWAYSONTOP */ + DEBUGOUTPUT = 281, /* "DEBUG" */ + RELOAD = 282, /* RELOAD */ + TRAYICON = 283, /* TRAYICON */ + FORCEEXIT = 284, /* FORCEEXIT */ + SILENTEXIT = 285, /* SILENTEXIT */ + STRING = 286 /* STRING */ }; + typedef enum yytokentype yytoken_kind_t; #endif -/* Tokens. */ +/* Token kinds. */ +#define YYEMPTY -2 +#define YYEOF 0 +#define YYerror 256 +#define YYUNDEF 257 #define NEWLINE 258 #define MENU 259 #define LB 260 @@ -275,7 +277,7 @@ unsigned long uVal; int iVal; -#line 279 "winprefsyacc.c" +#line 281 "winprefsyacc.c" }; typedef union YYSTYPE YYSTYPE; @@ -289,6 +291,78 @@ int yyparse (void); #endif /* !YY_YY_WINPREFSYACC_H_INCLUDED */ +/* Symbol kind. */ +enum yysymbol_kind_t +{ + YYSYMBOL_YYEMPTY = -2, + YYSYMBOL_YYEOF = 0, /* "end of file" */ + YYSYMBOL_YYerror = 1, /* error */ + YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ + YYSYMBOL_NEWLINE = 3, /* NEWLINE */ + YYSYMBOL_MENU = 4, /* MENU */ + YYSYMBOL_LB = 5, /* LB */ + YYSYMBOL_RB = 6, /* RB */ + YYSYMBOL_ICONDIRECTORY = 7, /* ICONDIRECTORY */ + YYSYMBOL_DEFAULTICON = 8, /* DEFAULTICON */ + YYSYMBOL_ICONS = 9, /* ICONS */ + YYSYMBOL_STYLES = 10, /* STYLES */ + YYSYMBOL_TOPMOST = 11, /* TOPMOST */ + YYSYMBOL_MAXIMIZE = 12, /* MAXIMIZE */ + YYSYMBOL_MINIMIZE = 13, /* MINIMIZE */ + YYSYMBOL_BOTTOM = 14, /* BOTTOM */ + YYSYMBOL_NOTITLE = 15, /* NOTITLE */ + YYSYMBOL_OUTLINE = 16, /* OUTLINE */ + YYSYMBOL_NOFRAME = 17, /* NOFRAME */ + YYSYMBOL_DEFAULTSYSMENU = 18, /* DEFAULTSYSMENU */ + YYSYMBOL_SYSMENU = 19, /* SYSMENU */ + YYSYMBOL_ROOTMENU = 20, /* ROOTMENU */ + YYSYMBOL_SEPARATOR = 21, /* SEPARATOR */ + YYSYMBOL_ATSTART = 22, /* ATSTART */ + YYSYMBOL_ATEND = 23, /* ATEND */ + YYSYMBOL_EXEC = 24, /* EXEC */ + YYSYMBOL_ALWAYSONTOP = 25, /* ALWAYSONTOP */ + YYSYMBOL_DEBUGOUTPUT = 26, /* "DEBUG" */ + YYSYMBOL_RELOAD = 27, /* RELOAD */ + YYSYMBOL_TRAYICON = 28, /* TRAYICON */ + YYSYMBOL_FORCEEXIT = 29, /* FORCEEXIT */ + YYSYMBOL_SILENTEXIT = 30, /* SILENTEXIT */ + YYSYMBOL_STRING = 31, /* STRING */ + YYSYMBOL_YYACCEPT = 32, /* $accept */ + YYSYMBOL_input = 33, /* input */ + YYSYMBOL_line = 34, /* line */ + YYSYMBOL_newline_or_nada = 35, /* newline_or_nada */ + YYSYMBOL_command = 36, /* command */ + YYSYMBOL_trayicon = 37, /* trayicon */ + YYSYMBOL_rootmenu = 38, /* rootmenu */ + YYSYMBOL_defaultsysmenu = 39, /* defaultsysmenu */ + YYSYMBOL_defaulticon = 40, /* defaulticon */ + YYSYMBOL_icondirectory = 41, /* icondirectory */ + YYSYMBOL_menuline = 42, /* menuline */ + YYSYMBOL_menulist = 43, /* menulist */ + YYSYMBOL_menu = 44, /* menu */ + YYSYMBOL_45_1 = 45, /* $@1 */ + YYSYMBOL_iconline = 46, /* iconline */ + YYSYMBOL_iconlist = 47, /* iconlist */ + YYSYMBOL_icons = 48, /* icons */ + YYSYMBOL_49_2 = 49, /* $@2 */ + YYSYMBOL_group1 = 50, /* group1 */ + YYSYMBOL_group2 = 51, /* group2 */ + YYSYMBOL_stylecombo = 52, /* stylecombo */ + YYSYMBOL_styleline = 53, /* styleline */ + YYSYMBOL_stylelist = 54, /* stylelist */ + YYSYMBOL_styles = 55, /* styles */ + YYSYMBOL_56_3 = 56, /* $@3 */ + YYSYMBOL_atspot = 57, /* atspot */ + YYSYMBOL_sysmenuline = 58, /* sysmenuline */ + YYSYMBOL_sysmenulist = 59, /* sysmenulist */ + YYSYMBOL_sysmenu = 60, /* sysmenu */ + YYSYMBOL_61_4 = 61, /* $@4 */ + YYSYMBOL_forceexit = 62, /* forceexit */ + YYSYMBOL_silentexit = 63, /* silentexit */ + YYSYMBOL_debug = 64 /* debug */ +}; +typedef enum yysymbol_kind_t yysymbol_kind_t; + @@ -329,6 +403,18 @@ typedef short yytype_int16; #endif +/* Work around bug in HP-UX 11.23, which defines these macros + incorrectly for preprocessor constants. This workaround can likely + be removed in 2023, as HPE has promised support for HP-UX 11.23 + (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of + . */ +#ifdef __hpux +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 +#endif + #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ @@ -388,6 +474,7 @@ #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) + /* Stored state numbers (used for stacks). */ typedef yytype_int8 yy_state_t; @@ -406,6 +493,7 @@ # endif #endif + #ifndef YY_ATTRIBUTE_PURE # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) @@ -424,9 +512,9 @@ /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) +# define YY_USE(E) ((void) (E)) #else -# define YYUSE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ @@ -463,7 +551,7 @@ #define YY_ASSERT(E) ((void) (0 && (E))) -#if ! defined yyoverflow || YYERROR_VERBOSE +#if !defined yyoverflow /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -528,8 +616,7 @@ # endif # endif # endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - +#endif /* !defined yyoverflow */ #if (! defined yyoverflow \ && (! defined __cplusplus \ @@ -605,14 +692,16 @@ /* YYNSTATES -- Number of states. */ #define YYNSTATES 121 -#define YYUNDEFTOK 2 +/* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 286 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ -#define YYTRANSLATE(YYX) \ - (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) +#define YYTRANSLATE(YYX) \ + (0 <= (YYX) && (YYX) <= YYMAXUTOK \ + ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ + : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ @@ -663,16 +752,23 @@ }; #endif -#if YYDEBUG || YYERROR_VERBOSE || 0 +/** Accessing symbol of state STATE. */ +#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) + +#if YYDEBUG || 0 +/* The user-facing name of the symbol whose (internal) number is + YYSYMBOL. No bounds checking. */ +static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; + /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "NEWLINE", "MENU", "LB", "RB", - "ICONDIRECTORY", "DEFAULTICON", "ICONS", "STYLES", "TOPMOST", "MAXIMIZE", - "MINIMIZE", "BOTTOM", "NOTITLE", "OUTLINE", "NOFRAME", "DEFAULTSYSMENU", - "SYSMENU", "ROOTMENU", "SEPARATOR", "ATSTART", "ATEND", "EXEC", - "ALWAYSONTOP", "\"DEBUG\"", "RELOAD", "TRAYICON", "FORCEEXIT", + "\"end of file\"", "error", "\"invalid token\"", "NEWLINE", "MENU", + "LB", "RB", "ICONDIRECTORY", "DEFAULTICON", "ICONS", "STYLES", "TOPMOST", + "MAXIMIZE", "MINIMIZE", "BOTTOM", "NOTITLE", "OUTLINE", "NOFRAME", + "DEFAULTSYSMENU", "SYSMENU", "ROOTMENU", "SEPARATOR", "ATSTART", "ATEND", + "EXEC", "ALWAYSONTOP", "\"DEBUG\"", "RELOAD", "TRAYICON", "FORCEEXIT", "SILENTEXIT", "STRING", "$accept", "input", "line", "newline_or_nada", "command", "trayicon", "rootmenu", "defaultsysmenu", "defaulticon", "icondirectory", "menuline", "menulist", "menu", "$@1", "iconline", @@ -680,9 +776,15 @@ "styleline", "stylelist", "styles", "$@3", "atspot", "sysmenuline", "sysmenulist", "sysmenu", "$@4", "forceexit", "silentexit", "debug", YY_NULLPTR }; + +static const char * +yysymbol_name (yysymbol_kind_t yysymbol) +{ + return yytname[yysymbol]; +} #endif -# ifdef YYPRINT +#ifdef YYPRINT /* YYTOKNUM[NUM] -- (External) token number corresponding to the (internal) symbol number NUM (which must be that of a token). */ static const yytype_int16 yytoknum[] = @@ -692,7 +794,7 @@ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286 }; -# endif +#endif #define YYPACT_NINF (-47) @@ -755,7 +857,7 @@ /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { - -1, 1, 16, 56, 17, 18, 19, 20, 21, 22, + 0, 1, 16, 56, 17, 18, 19, 20, 21, 22, 71, 72, 23, 54, 63, 64, 24, 45, 83, 84, 85, 66, 67, 25, 46, 49, 89, 90, 26, 59, 27, 28, 29 @@ -836,10 +938,10 @@ }; +enum { YYENOMEM = -2 }; + #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab @@ -865,10 +967,9 @@ } \ while (0) -/* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 - +/* Backward compatibility with an undocumented macro. + Use YYerror or YYUNDEF. */ +#define YYERRCODE YYUNDEF /* Enable debugging if requested. */ @@ -886,18 +987,18 @@ } while (0) /* This macro is provided for backward compatibility. */ -#ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -#endif +# ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ - Type, Value); \ + Kind, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) @@ -908,18 +1009,19 @@ `-----------------------------------*/ static void -yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) +yy_symbol_value_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { FILE *yyoutput = yyo; - YYUSE (yyoutput); + YY_USE (yyoutput); if (!yyvaluep) return; # ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyo, yytoknum[yytype], *yyvaluep); + if (yykind < YYNTOKENS) + YYPRINT (yyo, yytoknum[yykind], *yyvaluep); # endif YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -929,12 +1031,13 @@ `---------------------------*/ static void -yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep) +yy_symbol_print (FILE *yyo, + yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { YYFPRINTF (yyo, "%s %s (", - yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); + yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); - yy_symbol_value_print (yyo, yytype, yyvaluep); + yy_symbol_value_print (yyo, yykind, yyvaluep); YYFPRINTF (yyo, ")"); } @@ -967,7 +1070,8 @@ `------------------------------------------------*/ static void -yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule) +yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, + int yyrule) { int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; @@ -979,9 +1083,8 @@ { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, - yystos[+yyssp[yyi + 1 - yynrhs]], - &yyvsp[(yyi + 1) - (yynrhs)] - ); + YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), + &yyvsp[(yyi + 1) - (yynrhs)]); YYFPRINTF (stderr, "\n"); } } @@ -996,8 +1099,8 @@ multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YYDPRINTF(Args) ((void) 0) +# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ @@ -1020,259 +1123,30 @@ #endif -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S))) -# else -/* Return the length of YYSTR. */ -static YYPTRDIFF_T -yystrlen (const char *yystr) -{ - YYPTRDIFF_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -yystpcpy (char *yydest, const char *yysrc) -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYPTRDIFF_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYPTRDIFF_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - else - goto append; - - append: - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (yyres) - return yystpcpy (yyres, yystr) - yyres; - else - return yystrlen (yystr); -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg, - yy_state_t *yyssp, int yytoken) -{ - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = YY_NULLPTR; - /* Arguments of yyformat: reported tokens (one for the "unexpected", - one per "expected"). */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Actual size of YYARG. */ - int yycount = 0; - /* Cumulated lengths of YYARG. */ - YYPTRDIFF_T yysize = 0; - - /* There are many possibilities here to consider: - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[+*yyssp]; - YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); - yysize = yysize0; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - { - YYPTRDIFF_T yysize1 - = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return 2; - } - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - default: /* Avoid compiler warnings. */ - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - { - /* Don't count the "%s"s in the final size, but reserve room for - the terminator. */ - YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1; - if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM) - yysize = yysize1; - else - return 2; - } - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - ++yyp; - ++yyformat; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +yydestruct (const char *yymsg, + yysymbol_kind_t yykind, YYSTYPE *yyvaluep) { - YYUSE (yyvaluep); + YY_USE (yyvaluep); if (!yymsg) yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yytype); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } - - -/* The lookahead symbol. */ +/* Lookahead token kind. */ int yychar; /* The semantic value of the lookahead symbol. */ @@ -1281,6 +1155,8 @@ int yynerrs; + + /*----------. | yyparse. | `----------*/ @@ -1288,43 +1164,36 @@ int yyparse (void) { - yy_state_fast_t yystate; + yy_state_fast_t yystate = 0; /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; + int yyerrstatus = 0; - /* The stacks and their tools: - 'yyss': related to states. - 'yyvs': related to semantic values. - - Refer to the stacks through separate pointers, to allow yyoverflow + /* Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ - /* The state stack. */ + /* Their size. */ + YYPTRDIFF_T yystacksize = YYINITDEPTH; + + /* The state stack: array, bottom, top. */ yy_state_t yyssa[YYINITDEPTH]; - yy_state_t *yyss; - yy_state_t *yyssp; + yy_state_t *yyss = yyssa; + yy_state_t *yyssp = yyss; - /* The semantic value stack. */ + /* The semantic value stack: array, bottom, top. */ YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - YYPTRDIFF_T yystacksize; + YYSTYPE *yyvs = yyvsa; + YYSTYPE *yyvsp = yyvs; int yyn; + /* The return value of yyparse. */ int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; + /* Lookahead symbol kind. */ + yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf; -#endif + #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) @@ -1332,15 +1201,8 @@ Keep to zero when no symbol should be popped. */ int yylen = 0; - yyssp = yyss = yyssa; - yyvsp = yyvs = yyvsa; - yystacksize = YYINITDEPTH; - YYDPRINTF ((stderr, "Starting parse\n")); - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; @@ -1363,6 +1225,7 @@ YY_IGNORE_USELESS_CAST_BEGIN *yyssp = YY_CAST (yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END + YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE @@ -1408,7 +1271,7 @@ goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); -# undef YYSTACK_RELOCATE +# undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } @@ -1447,18 +1310,29 @@ /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ if (yychar == YYEMPTY) { - YYDPRINTF ((stderr, "Reading a token: ")); + YYDPRINTF ((stderr, "Reading a token\n")); yychar = yylex (); } if (yychar <= YYEOF) { - yychar = yytoken = YYEOF; + yychar = YYEOF; + yytoken = YYSYMBOL_YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } + else if (yychar == YYerror) + { + /* The scanner already issued an error message, process directly + to error recovery. But do not keep the error token as + lookahead, it is too special and may lead us to an endless + loop in error recovery. */ + yychar = YYUNDEF; + yytoken = YYSYMBOL_YYerror; + goto yyerrlab1; + } else { yytoken = YYTRANSLATE (yychar); @@ -1527,236 +1401,236 @@ YY_REDUCE_PRINT (yyn); switch (yyn) { - case 20: + case 20: /* trayicon: TRAYICON STRING NEWLINE */ #line 160 "winprefsyacc.y" { SetTrayIcon((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } -#line 1534 "winprefsyacc.c" +#line 1408 "winprefsyacc.c" break; - case 21: + case 21: /* rootmenu: ROOTMENU STRING NEWLINE */ #line 163 "winprefsyacc.y" { SetRootMenu((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } -#line 1540 "winprefsyacc.c" +#line 1414 "winprefsyacc.c" break; - case 22: + case 22: /* defaultsysmenu: DEFAULTSYSMENU STRING atspot NEWLINE */ #line 166 "winprefsyacc.y" { SetDefaultSysMenu((yyvsp[-2].sVal), (yyvsp[-1].iVal)); free((yyvsp[-2].sVal)); } -#line 1546 "winprefsyacc.c" +#line 1420 "winprefsyacc.c" break; - case 23: + case 23: /* defaulticon: DEFAULTICON STRING NEWLINE */ #line 169 "winprefsyacc.y" { SetDefaultIcon((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } -#line 1552 "winprefsyacc.c" +#line 1426 "winprefsyacc.c" break; - case 24: + case 24: /* icondirectory: ICONDIRECTORY STRING NEWLINE */ #line 172 "winprefsyacc.y" { SetIconDirectory((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } -#line 1558 "winprefsyacc.c" +#line 1432 "winprefsyacc.c" break; - case 25: + case 25: /* menuline: SEPARATOR NEWLINE newline_or_nada */ #line 175 "winprefsyacc.y" { AddMenuLine("-", CMD_SEPARATOR, ""); } -#line 1564 "winprefsyacc.c" +#line 1438 "winprefsyacc.c" break; - case 26: + case 26: /* menuline: STRING ALWAYSONTOP NEWLINE newline_or_nada */ #line 176 "winprefsyacc.y" { AddMenuLine((yyvsp[-3].sVal), CMD_ALWAYSONTOP, ""); free((yyvsp[-3].sVal)); } -#line 1570 "winprefsyacc.c" +#line 1444 "winprefsyacc.c" break; - case 27: + case 27: /* menuline: STRING EXEC STRING NEWLINE newline_or_nada */ #line 177 "winprefsyacc.y" { AddMenuLine((yyvsp[-4].sVal), CMD_EXEC, (yyvsp[-2].sVal)); free((yyvsp[-4].sVal)); free((yyvsp[-2].sVal)); } -#line 1576 "winprefsyacc.c" +#line 1450 "winprefsyacc.c" break; - case 28: + case 28: /* menuline: STRING MENU STRING NEWLINE newline_or_nada */ #line 178 "winprefsyacc.y" { AddMenuLine((yyvsp[-4].sVal), CMD_MENU, (yyvsp[-2].sVal)); free((yyvsp[-4].sVal)); free((yyvsp[-2].sVal)); } -#line 1582 "winprefsyacc.c" +#line 1456 "winprefsyacc.c" break; - case 29: + case 29: /* menuline: STRING RELOAD NEWLINE newline_or_nada */ #line 179 "winprefsyacc.y" { AddMenuLine((yyvsp[-3].sVal), CMD_RELOAD, ""); free((yyvsp[-3].sVal)); } -#line 1588 "winprefsyacc.c" +#line 1462 "winprefsyacc.c" break; - case 32: + case 32: /* $@1: %empty */ #line 186 "winprefsyacc.y" { OpenMenu((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } -#line 1594 "winprefsyacc.c" +#line 1468 "winprefsyacc.c" break; - case 33: + case 33: /* menu: MENU STRING LB $@1 newline_or_nada menulist RB */ #line 186 "winprefsyacc.y" {CloseMenu();} -#line 1600 "winprefsyacc.c" +#line 1474 "winprefsyacc.c" break; - case 34: + case 34: /* iconline: STRING STRING NEWLINE newline_or_nada */ #line 189 "winprefsyacc.y" { AddIconLine((yyvsp[-3].sVal), (yyvsp[-2].sVal)); free((yyvsp[-3].sVal)); free((yyvsp[-2].sVal)); } -#line 1606 "winprefsyacc.c" +#line 1480 "winprefsyacc.c" break; - case 37: + case 37: /* $@2: %empty */ #line 196 "winprefsyacc.y" {OpenIcons();} -#line 1612 "winprefsyacc.c" +#line 1486 "winprefsyacc.c" break; - case 38: + case 38: /* icons: ICONS LB $@2 newline_or_nada iconlist RB */ #line 196 "winprefsyacc.y" {CloseIcons();} -#line 1618 "winprefsyacc.c" +#line 1492 "winprefsyacc.c" break; - case 39: + case 39: /* group1: TOPMOST */ #line 199 "winprefsyacc.y" { (yyval.uVal)=STYLE_TOPMOST; } -#line 1624 "winprefsyacc.c" +#line 1498 "winprefsyacc.c" break; - case 40: + case 40: /* group1: MAXIMIZE */ #line 200 "winprefsyacc.y" { (yyval.uVal)=STYLE_MAXIMIZE; } -#line 1630 "winprefsyacc.c" +#line 1504 "winprefsyacc.c" break; - case 41: + case 41: /* group1: MINIMIZE */ #line 201 "winprefsyacc.y" { (yyval.uVal)=STYLE_MINIMIZE; } -#line 1636 "winprefsyacc.c" +#line 1510 "winprefsyacc.c" break; - case 42: + case 42: /* group1: BOTTOM */ #line 202 "winprefsyacc.y" { (yyval.uVal)=STYLE_BOTTOM; } -#line 1642 "winprefsyacc.c" +#line 1516 "winprefsyacc.c" break; - case 43: + case 43: /* group2: NOTITLE */ #line 205 "winprefsyacc.y" { (yyval.uVal)=STYLE_NOTITLE; } -#line 1648 "winprefsyacc.c" +#line 1522 "winprefsyacc.c" break; - case 44: + case 44: /* group2: OUTLINE */ #line 206 "winprefsyacc.y" { (yyval.uVal)=STYLE_OUTLINE; } -#line 1654 "winprefsyacc.c" +#line 1528 "winprefsyacc.c" break; - case 45: + case 45: /* group2: NOFRAME */ #line 207 "winprefsyacc.y" { (yyval.uVal)=STYLE_NOFRAME; } -#line 1660 "winprefsyacc.c" +#line 1534 "winprefsyacc.c" break; - case 46: + case 46: /* stylecombo: group1 */ #line 210 "winprefsyacc.y" { (yyval.uVal)=(yyvsp[0].uVal); } -#line 1666 "winprefsyacc.c" +#line 1540 "winprefsyacc.c" break; - case 47: + case 47: /* stylecombo: group2 */ #line 211 "winprefsyacc.y" { (yyval.uVal)=(yyvsp[0].uVal); } -#line 1672 "winprefsyacc.c" +#line 1546 "winprefsyacc.c" break; - case 48: + case 48: /* stylecombo: group1 group2 */ #line 212 "winprefsyacc.y" { (yyval.uVal)=(yyvsp[-1].uVal)|(yyvsp[0].uVal); } -#line 1678 "winprefsyacc.c" +#line 1552 "winprefsyacc.c" break; - case 49: + case 49: /* stylecombo: group2 group1 */ #line 213 "winprefsyacc.y" { (yyval.uVal)=(yyvsp[-1].uVal)|(yyvsp[0].uVal); } -#line 1684 "winprefsyacc.c" +#line 1558 "winprefsyacc.c" break; - case 50: + case 50: /* styleline: STRING stylecombo NEWLINE newline_or_nada */ #line 216 "winprefsyacc.y" { AddStyleLine((yyvsp[-3].sVal), (yyvsp[-2].uVal)); free((yyvsp[-3].sVal)); } -#line 1690 "winprefsyacc.c" +#line 1564 "winprefsyacc.c" break; - case 53: + case 53: /* $@3: %empty */ #line 223 "winprefsyacc.y" {OpenStyles();} -#line 1696 "winprefsyacc.c" +#line 1570 "winprefsyacc.c" break; - case 54: + case 54: /* styles: STYLES LB $@3 newline_or_nada stylelist RB */ #line 223 "winprefsyacc.y" {CloseStyles();} -#line 1702 "winprefsyacc.c" +#line 1576 "winprefsyacc.c" break; - case 55: + case 55: /* atspot: %empty */ #line 226 "winprefsyacc.y" { (yyval.iVal)=AT_END; } -#line 1708 "winprefsyacc.c" +#line 1582 "winprefsyacc.c" break; - case 56: + case 56: /* atspot: ATSTART */ #line 227 "winprefsyacc.y" { (yyval.iVal)=AT_START; } -#line 1714 "winprefsyacc.c" +#line 1588 "winprefsyacc.c" break; - case 57: + case 57: /* atspot: ATEND */ #line 228 "winprefsyacc.y" { (yyval.iVal)=AT_END; } -#line 1720 "winprefsyacc.c" +#line 1594 "winprefsyacc.c" break; - case 58: + case 58: /* sysmenuline: STRING STRING atspot NEWLINE newline_or_nada */ #line 231 "winprefsyacc.y" { AddSysMenuLine((yyvsp[-4].sVal), (yyvsp[-3].sVal), (yyvsp[-2].iVal)); free((yyvsp[-4].sVal)); free((yyvsp[-3].sVal)); } -#line 1726 "winprefsyacc.c" +#line 1600 "winprefsyacc.c" break; - case 61: + case 61: /* $@4: %empty */ #line 238 "winprefsyacc.y" {OpenSysMenu();} -#line 1732 "winprefsyacc.c" +#line 1606 "winprefsyacc.c" break; - case 62: + case 62: /* sysmenu: SYSMENU LB NEWLINE $@4 newline_or_nada sysmenulist RB */ #line 238 "winprefsyacc.y" {CloseSysMenu();} -#line 1738 "winprefsyacc.c" +#line 1612 "winprefsyacc.c" break; - case 63: + case 63: /* forceexit: FORCEEXIT NEWLINE */ #line 241 "winprefsyacc.y" { pref.fForceExit = TRUE; } -#line 1744 "winprefsyacc.c" +#line 1618 "winprefsyacc.c" break; - case 64: + case 64: /* silentexit: SILENTEXIT NEWLINE */ #line 244 "winprefsyacc.y" { pref.fSilentExit = TRUE; } -#line 1750 "winprefsyacc.c" +#line 1624 "winprefsyacc.c" break; - case 65: + case 65: /* debug: "DEBUG" STRING NEWLINE */ #line 247 "winprefsyacc.y" { ErrorF("LoadPreferences: %s\n", (yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } -#line 1756 "winprefsyacc.c" +#line 1630 "winprefsyacc.c" break; -#line 1760 "winprefsyacc.c" +#line 1634 "winprefsyacc.c" default: break; } @@ -1771,11 +1645,10 @@ case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; - YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; @@ -1799,50 +1672,14 @@ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - + yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; -#if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc))); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif } - - if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an @@ -1891,13 +1728,14 @@ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ + /* Pop stack until we find a state that shifts the error token. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + yyn += YYSYMBOL_YYerror; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { yyn = yytable[yyn]; if (0 < yyn) @@ -1911,7 +1749,7 @@ yydestruct ("Error: popping", - yystos[yystate], yyvsp); + YY_ACCESSING_SYMBOL (yystate), yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -1923,7 +1761,7 @@ /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; @@ -1945,20 +1783,20 @@ goto yyreturn; -#if !defined yyoverflow || YYERROR_VERBOSE +#if !defined yyoverflow /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; - /* Fall through. */ + goto yyreturn; #endif -/*-----------------------------------------------------. -| yyreturn -- parsing is finished, return the result. | -`-----------------------------------------------------*/ +/*-------------------------------------------------------. +| yyreturn -- parsing is finished, clean up and return. | +`-------------------------------------------------------*/ yyreturn: if (yychar != YYEMPTY) { @@ -1975,19 +1813,17 @@ while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[+*yyssp], yyvsp); + YY_ACCESSING_SYMBOL (+*yyssp), yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif + return yyresult; } + #line 251 "winprefsyacc.y" /* diff -Nru xorg-server-21.1.3/hw/xwin/winprefsyacc.h xorg-server-21.1.4/hw/xwin/winprefsyacc.h --- xorg-server-21.1.3/hw/xwin/winprefsyacc.h 2022-01-02 22:42:36.000000000 +0000 +++ xorg-server-21.1.4/hw/xwin/winprefsyacc.h 2022-07-12 13:28:38.000000000 +0000 @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.5.1. */ +/* A Bison parser, made by GNU Bison 3.7.5. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -31,8 +31,9 @@ This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ -/* Undocumented macros, especially those whose name start with YY_, - are private implementation details. Do not rely on them. */ +/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, + especially those whose name start with YY_ or yy_. They are + private implementation details that can be changed or removed. */ #ifndef YY_YY_WINPREFSYACC_H_INCLUDED # define YY_YY_WINPREFSYACC_H_INCLUDED @@ -44,43 +45,52 @@ extern int yydebug; #endif -/* Token type. */ +/* Token kinds. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { - NEWLINE = 258, - MENU = 259, - LB = 260, - RB = 261, - ICONDIRECTORY = 262, - DEFAULTICON = 263, - ICONS = 264, - STYLES = 265, - TOPMOST = 266, - MAXIMIZE = 267, - MINIMIZE = 268, - BOTTOM = 269, - NOTITLE = 270, - OUTLINE = 271, - NOFRAME = 272, - DEFAULTSYSMENU = 273, - SYSMENU = 274, - ROOTMENU = 275, - SEPARATOR = 276, - ATSTART = 277, - ATEND = 278, - EXEC = 279, - ALWAYSONTOP = 280, - DEBUGOUTPUT = 281, - RELOAD = 282, - TRAYICON = 283, - FORCEEXIT = 284, - SILENTEXIT = 285, - STRING = 286 + YYEMPTY = -2, + YYEOF = 0, /* "end of file" */ + YYerror = 256, /* error */ + YYUNDEF = 257, /* "invalid token" */ + NEWLINE = 258, /* NEWLINE */ + MENU = 259, /* MENU */ + LB = 260, /* LB */ + RB = 261, /* RB */ + ICONDIRECTORY = 262, /* ICONDIRECTORY */ + DEFAULTICON = 263, /* DEFAULTICON */ + ICONS = 264, /* ICONS */ + STYLES = 265, /* STYLES */ + TOPMOST = 266, /* TOPMOST */ + MAXIMIZE = 267, /* MAXIMIZE */ + MINIMIZE = 268, /* MINIMIZE */ + BOTTOM = 269, /* BOTTOM */ + NOTITLE = 270, /* NOTITLE */ + OUTLINE = 271, /* OUTLINE */ + NOFRAME = 272, /* NOFRAME */ + DEFAULTSYSMENU = 273, /* DEFAULTSYSMENU */ + SYSMENU = 274, /* SYSMENU */ + ROOTMENU = 275, /* ROOTMENU */ + SEPARATOR = 276, /* SEPARATOR */ + ATSTART = 277, /* ATSTART */ + ATEND = 278, /* ATEND */ + EXEC = 279, /* EXEC */ + ALWAYSONTOP = 280, /* ALWAYSONTOP */ + DEBUGOUTPUT = 281, /* "DEBUG" */ + RELOAD = 282, /* RELOAD */ + TRAYICON = 283, /* TRAYICON */ + FORCEEXIT = 284, /* FORCEEXIT */ + SILENTEXIT = 285, /* SILENTEXIT */ + STRING = 286 /* STRING */ }; + typedef enum yytokentype yytoken_kind_t; #endif -/* Tokens. */ +/* Token kinds. */ +#define YYEMPTY -2 +#define YYEOF 0 +#define YYerror 256 +#define YYUNDEF 257 #define NEWLINE 258 #define MENU 259 #define LB 260 @@ -121,7 +131,7 @@ unsigned long uVal; int iVal; -#line 125 "winprefsyacc.h" +#line 135 "winprefsyacc.h" }; typedef union YYSTYPE YYSTYPE; diff -Nru xorg-server-21.1.3/include/Makefile.in xorg-server-21.1.4/include/Makefile.in --- xorg-server-21.1.3/include/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/include/Makefile.in 2022-07-12 13:28:13.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -164,8 +164,8 @@ displaymode.h window.h windowstr.h xkbfile.h xkbsrv.h xkbstr.h \ xkbrules.h xserver_poll.h xserver-properties.h HEADERS = $(nodist_sdk_HEADERS) $(sdk_HEADERS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)do-not-use-config.h.in xorg-server.h.in dix-config.h.in \ +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + do-not-use-config.h.in xorg-server.h.in dix-config.h.in \ xorg-config.h.in xkb-config.h.in xwin-config.h.in \ version-config.h.in # Read a list of newline-separated strings from the standard input, @@ -846,7 +846,8 @@ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am +install-exec: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -943,7 +944,7 @@ uninstall-am: uninstall-nodist_sdkHEADERS uninstall-sdkHEADERS -.MAKE: all check install install-am install-strip +.MAKE: all check install install-am install-exec install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool cscopelist-am ctags ctags-am distclean \ diff -Nru xorg-server-21.1.3/include/input.h xorg-server-21.1.4/include/input.h --- xorg-server-21.1.3/include/input.h 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/include/input.h 2022-07-12 13:27:57.000000000 +0000 @@ -676,6 +676,7 @@ extern void ProcessGestureEvent(InternalEvent *ev, DeviceIntPtr dev); /* misc event helpers */ +extern void CopyPartialInternalEvent(InternalEvent* dst_event, const InternalEvent* src_event); extern Mask GetEventMask(DeviceIntPtr dev, xEvent *ev, InputClientsPtr clients); extern Mask GetEventFilter(DeviceIntPtr dev, xEvent *event); extern Bool WindowXI2MaskIsset(DeviceIntPtr dev, WindowPtr win, xEvent *ev); diff -Nru xorg-server-21.1.3/install-sh xorg-server-21.1.4/install-sh --- xorg-server-21.1.3/install-sh 2022-01-02 22:42:09.000000000 +0000 +++ xorg-server-21.1.4/install-sh 2022-07-12 13:28:09.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2018-03-11.20; # UTC +scriptversion=2020-11-14.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -69,6 +69,11 @@ # Desired mode of installed file. mode=0755 +# Create dirs (including intermediate dirs) using mode 755. +# This is like GNU 'install' as of coreutils 8.32 (2020). +mkdir_umask=22 + +backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= @@ -99,18 +104,28 @@ --version display version info and exit. -c (ignored) - -C install only if different (preserve the last data modification time) + -C install only if different (preserve data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. + -p pass -p to $cpprog. -s $stripprog installed files. + -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + +By default, rm is invoked with -f; when overridden with RMPROG, +it's up to you to specify -f if you want it. + +If -S is not specified, no backups are attempted. + +Email bug reports to bug-automake@gnu.org. +Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do @@ -137,8 +152,13 @@ -o) chowncmd="$chownprog $2" shift;; + -p) cpprog="$cpprog -p";; + -s) stripcmd=$stripprog;; + -S) backupsuffix="$2" + shift;; + -t) is_target_a_directory=always dst_arg=$2 @@ -255,6 +275,10 @@ dstdir=$dst test -d "$dstdir" dstdir_status=$? + # Don't chown directories that already exist. + if test $dstdir_status = 0; then + chowncmd="" + fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command @@ -301,22 +325,6 @@ if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then @@ -326,52 +334,49 @@ fi posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - # Note that $RANDOM variable is not portable (e.g. dash); Use it - # here however when possible just to lower collision chance. - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - - trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - - # Because "mkdir -p" follows existing symlinks and we likely work - # directly in world-writeable /tmp, make sure that the '$tmpdir' - # directory is successfully created first before we actually test - # 'mkdir -p' feature. - if (umask $mkdir_umask && - $mkdirprog $mkdir_mode "$tmpdir" && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - test_tmpdir="$tmpdir/a" - ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null - fi - trap '' 0;; - esac;; + # The $RANDOM variable is not portable (e.g., dash). Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap ' + ret=$? + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null + exit $ret + ' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p'. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; esac if @@ -382,7 +387,7 @@ then : else - # The umask is ridiculous, or mkdir does not conform to POSIX, + # mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. @@ -411,7 +416,7 @@ prefixes= else if $posix_mkdir; then - (umask=$mkdir_umask && + (umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 @@ -451,7 +456,18 @@ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -477,6 +493,13 @@ then rm -f "$dsttmp" else + # If $backupsuffix is set, and the file being installed + # already exists, attempt a backup. Don't worry if it fails, + # e.g., if mv doesn't support -f. + if test -n "$backupsuffix" && test -f "$dst"; then + $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null + fi + # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || @@ -491,9 +514,9 @@ # file should still install successfully. { test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || + $doit $rmcmd "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 diff -Nru xorg-server-21.1.3/ltmain.sh xorg-server-21.1.4/ltmain.sh --- xorg-server-21.1.3/ltmain.sh 2022-01-02 22:42:02.000000000 +0000 +++ xorg-server-21.1.4/ltmain.sh 2022-07-12 13:28:03.000000000 +0000 @@ -31,7 +31,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.6 Debian-2.4.6-14" +VERSION="2.4.6 Debian-2.4.6-15" package_revision=2.4.6 @@ -2141,7 +2141,7 @@ compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) - version: $progname $scriptversion Debian-2.4.6-14 + version: $progname $scriptversion Debian-2.4.6-15 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` diff -Nru xorg-server-21.1.3/m4/libtool.m4 xorg-server-21.1.4/m4/libtool.m4 --- xorg-server-21.1.3/m4/libtool.m4 2022-01-02 22:42:02.000000000 +0000 +++ xorg-server-21.1.4/m4/libtool.m4 2022-07-12 13:28:03.000000000 +0000 @@ -1071,11 +1071,11 @@ # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) + 10.0,*86*-darwin8*|10.0,*-darwin[[912]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) + 10.*|11.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; diff -Nru xorg-server-21.1.3/man/Makefile.in xorg-server-21.1.4/man/Makefile.in --- xorg-server-21.1.3/man/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/man/Makefile.in 2022-07-12 13:28:13.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/meson.build xorg-server-21.1.4/meson.build --- xorg-server-21.1.3/meson.build 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/meson.build 2022-07-12 13:27:57.000000000 +0000 @@ -3,10 +3,10 @@ 'buildtype=debugoptimized', 'c_std=gnu99', ], - version: '21.1.3', + version: '21.1.4', meson_version: '>= 0.47.0', ) -release_date = '2022-01-02' +release_date = '2022-07-12' add_project_arguments('-DHAVE_DIX_CONFIG_H', language: ['c', 'objc']) cc = meson.get_compiler('c') @@ -184,8 +184,7 @@ endif build_xorg = false -if (host_machine.system() != 'darwin' and - host_machine.system() != 'windows') +if (host_machine.system() != 'windows') if get_option('xorg') == 'auto' build_xorg = (host_machine.system() != 'darwin' and host_machine.system() != 'windows') @@ -197,8 +196,7 @@ libxcvt_dep = dependency('libxcvt', required: build_xorg) build_xnest = false -if (host_machine.system() != 'darwin' and - host_machine.system() != 'windows') +if (host_machine.system() != 'windows') if get_option('xnest') != 'false' xnest_required = get_option('xnest') == 'true' diff -Nru xorg-server-21.1.3/meson_options.txt xorg-server-21.1.4/meson_options.txt --- xorg-server-21.1.3/meson_options.txt 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/meson_options.txt 2022-07-12 13:27:57.000000000 +0000 @@ -116,8 +116,14 @@ description: 'Application name') option('bundle-id-prefix', type: 'string', value: 'org.x', description: 'RDNS prefix for bundle identifier') +option('bundle-version', type: 'string', value: 'auto', + description: 'The CFBundleVersion for the application bundle') +option('bundle-version-string', type: 'string', value: 'auto', + description: 'The CFBundleShortVersionString for the application bundle') option('sparkle-feed-url', type: 'string', description: 'Feed URL for autoupdating with the Sparkle Framework (default: disabled)') +option('sparkle-public-edkey', type: 'string', + description: 'Public EdDSA key for verifying updates from the Sparkle feed (default: disabled)') option('xpbproxy', type: 'boolean', value: false, description: 'Build a standalone X pasteboard proxy') diff -Nru xorg-server-21.1.3/mi/Makefile.in xorg-server-21.1.4/mi/Makefile.in --- xorg-server-21.1.3/mi/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/mi/Makefile.in 2022-07-12 13:28:13.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/miext/Makefile.in xorg-server-21.1.4/miext/Makefile.in --- xorg-server-21.1.3/miext/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/miext/Makefile.in 2022-07-12 13:28:13.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/miext/damage/Makefile.in xorg-server-21.1.4/miext/damage/Makefile.in --- xorg-server-21.1.3/miext/damage/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/miext/damage/Makefile.in 2022-07-12 13:28:13.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/miext/rootless/Makefile.in xorg-server-21.1.4/miext/rootless/Makefile.in --- xorg-server-21.1.3/miext/rootless/Makefile.in 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/miext/rootless/Makefile.in 2022-07-12 13:28:13.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/miext/rootless/rootlessScreen.c xorg-server-21.1.4/miext/rootless/rootlessScreen.c --- xorg-server-21.1.3/miext/rootless/rootlessScreen.c 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/miext/rootless/rootlessScreen.c 2022-07-12 13:27:57.000000000 +0000 @@ -51,11 +51,6 @@ #include "rootlessCommon.h" #include "rootlessWindow.h" -/* In milliseconds */ -#ifndef ROOTLESS_REDISPLAY_DELAY -#define ROOTLESS_REDISPLAY_DELAY 10 -#endif - extern int RootlessMiValidateTree(WindowPtr pRoot, WindowPtr pChild, VTKind kind); extern Bool RootlessCreateGC(GCPtr pGC); diff -Nru xorg-server-21.1.3/miext/shadow/Makefile.in xorg-server-21.1.4/miext/shadow/Makefile.in --- xorg-server-21.1.3/miext/shadow/Makefile.in 2022-01-02 22:42:13.000000000 +0000 +++ xorg-server-21.1.4/miext/shadow/Makefile.in 2022-07-12 13:28:13.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/miext/sync/Makefile.in xorg-server-21.1.4/miext/sync/Makefile.in --- xorg-server-21.1.3/miext/sync/Makefile.in 2022-01-02 22:42:13.000000000 +0000 +++ xorg-server-21.1.4/miext/sync/Makefile.in 2022-07-12 13:28:13.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/missing xorg-server-21.1.4/missing --- xorg-server-21.1.3/missing 2022-01-02 22:42:09.000000000 +0000 +++ xorg-server-21.1.4/missing 2022-07-12 13:28:09.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify diff -Nru xorg-server-21.1.3/os/Makefile.in xorg-server-21.1.4/os/Makefile.in --- xorg-server-21.1.3/os/Makefile.in 2022-01-02 22:42:13.000000000 +0000 +++ xorg-server-21.1.4/os/Makefile.in 2022-07-12 13:28:13.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/os/connection.c xorg-server-21.1.4/os/connection.c --- xorg-server-21.1.3/os/connection.c 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/os/connection.c 2022-07-12 13:27:57.000000000 +0000 @@ -79,6 +79,8 @@ #include #include +#include + #ifndef WIN32 #include @@ -989,15 +991,34 @@ void ListenOnOpenFD(int fd, int noxauth) { - char port[256]; + char port[PATH_MAX]; XtransConnInfo ciptr; const char *display_env = getenv("DISPLAY"); - if (display_env && (strncmp(display_env, "/tmp/launch", 11) == 0)) { - /* Make the path the launchd socket if our DISPLAY is set right */ - strcpy(port, display_env); + /* First check if display_env matches a [.] scheme (eg: launchd) */ + if (display_env && display_env[0] == '/') { + struct stat sbuf; + + strlcpy(port, display_env, sizeof(port)); + + /* If the path exists, we don't have do do anything else. + * If it doesn't, we need to check for a . to strip off and recheck. + */ + if (0 != stat(port, &sbuf)) { + char *dot = strrchr(port, '.'); + if (dot) { + *dot = '\0'; + + if (0 != stat(port, &sbuf)) { + display_env = NULL; + } + } else { + display_env = NULL; + } + } } - else { + + if (!display_env) { /* Just some default so things don't break and die. */ snprintf(port, sizeof(port), ":%d", atoi(display)); } diff -Nru xorg-server-21.1.3/os/utils.c xorg-server-21.1.4/os/utils.c --- xorg-server-21.1.3/os/utils.c 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/os/utils.c 2022-07-12 13:27:57.000000000 +0000 @@ -681,7 +681,6 @@ ErrorF("Failed to disable listen for %s transport", defaultNoListenList[i]); } - SeatId = getenv("XDG_SEAT"); for (i = 1; i < argc; i++) { /* call ddx first, so it can peek/override if it wants */ diff -Nru xorg-server-21.1.3/present/Makefile.in xorg-server-21.1.4/present/Makefile.in --- xorg-server-21.1.3/present/Makefile.in 2022-01-02 22:42:13.000000000 +0000 +++ xorg-server-21.1.4/present/Makefile.in 2022-07-12 13:28:13.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/present/present_scmd.c xorg-server-21.1.4/present/present_scmd.c --- xorg-server-21.1.3/present/present_scmd.c 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/present/present_scmd.c 2022-07-12 13:27:58.000000000 +0000 @@ -158,6 +158,9 @@ if (!screen_priv->info) return NULL; + if (!screen_priv->info->get_crtc) + return NULL; + return (*screen_priv->info->get_crtc)(window); } @@ -196,6 +199,9 @@ if (!screen_priv->info) return; + if (!screen_priv->info->flush) + return; + (*screen_priv->info->flush) (window); } diff -Nru xorg-server-21.1.3/pseudoramiX/Makefile.in xorg-server-21.1.4/pseudoramiX/Makefile.in --- xorg-server-21.1.3/pseudoramiX/Makefile.in 2022-01-02 22:42:13.000000000 +0000 +++ xorg-server-21.1.4/pseudoramiX/Makefile.in 2022-07-12 13:28:13.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/randr/Makefile.in xorg-server-21.1.4/randr/Makefile.in --- xorg-server-21.1.3/randr/Makefile.in 2022-01-02 22:42:13.000000000 +0000 +++ xorg-server-21.1.4/randr/Makefile.in 2022-07-12 13:28:13.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/record/Makefile.in xorg-server-21.1.4/record/Makefile.in --- xorg-server-21.1.3/record/Makefile.in 2022-01-02 22:42:13.000000000 +0000 +++ xorg-server-21.1.4/record/Makefile.in 2022-07-12 13:28:13.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/render/Makefile.in xorg-server-21.1.4/render/Makefile.in --- xorg-server-21.1.3/render/Makefile.in 2022-01-02 22:42:13.000000000 +0000 +++ xorg-server-21.1.4/render/Makefile.in 2022-07-12 13:28:13.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru xorg-server-21.1.3/render/picture.c xorg-server-21.1.4/render/picture.c --- xorg-server-21.1.3/render/picture.c 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/render/picture.c 2022-07-12 13:27:58.000000000 +0000 @@ -865,7 +865,7 @@ } pPicture->id = pid; - pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictSolidFill)); + pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict)); if (!pPicture->pSourcePict) { *error = BadAlloc; free(pPicture); @@ -896,7 +896,7 @@ } pPicture->id = pid; - pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictLinearGradient)); + pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict)); if (!pPicture->pSourcePict) { *error = BadAlloc; free(pPicture); @@ -936,7 +936,7 @@ } pPicture->id = pid; - pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictRadialGradient)); + pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict)); if (!pPicture->pSourcePict) { *error = BadAlloc; free(pPicture); @@ -979,7 +979,7 @@ } pPicture->id = pid; - pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictConicalGradient)); + pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict)); if (!pPicture->pSourcePict) { *error = BadAlloc; free(pPicture); diff -Nru xorg-server-21.1.3/test/Makefile.in xorg-server-21.1.4/test/Makefile.in --- xorg-server-21.1.3/test/Makefile.in 2022-01-02 22:42:13.000000000 +0000 +++ xorg-server-21.1.4/test/Makefile.in 2022-07-12 13:28:13.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -542,6 +542,7 @@ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` +AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) @ENABLE_UNIT_TESTS_TRUE@am__EXEEXT_1 = $(XVFB_TESTS) \ @ENABLE_UNIT_TESTS_TRUE@ $(XEPHYR_GLAMOR_TESTS) @@ -1674,7 +1675,7 @@ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ - echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ @@ -1825,7 +1826,8 @@ installdirs-am: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive -install-exec: install-exec-recursive +install-exec: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive @@ -1985,7 +1987,7 @@ uninstall-am: .MAKE: $(am__recursive_targets) all check check-am install install-am \ - install-strip + install-exec install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles check check-TESTS check-am clean clean-generic \ diff -Nru xorg-server-21.1.3/test/meson.build xorg-server-21.1.4/test/meson.build --- xorg-server-21.1.3/test/meson.build 2022-01-02 22:41:56.000000000 +0000 +++ xorg-server-21.1.4/test/meson.build 2022-07-12 13:27:58.000000000 +0000 @@ -110,6 +110,8 @@ unit_sources = [ '../mi/miinitext.c', '../mi/miinitext.h', + '../mi/micmap.c', + '../mi/micmap.h', 'fixes.c', 'input.c', 'list.c', diff -Nru xorg-server-21.1.3/test-driver xorg-server-21.1.4/test-driver --- xorg-server-21.1.3/test-driver 2022-01-02 22:42:13.000000000 +0000 +++ xorg-server-21.1.4/test-driver 2022-07-12 13:28:13.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2018 Free Software Foundation, Inc. +# Copyright (C) 2011-2020 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -42,11 +42,13 @@ { cat <present & XkbKeyTypesMask)) { - nTypes = xkb->map->num_types; - } - else if (!CheckKeyTypes(client, xkb, req, (xkbKeyTypeWireDesc **) &values, - &nTypes, mapWidths, doswap)) { + /* nTypes/mapWidths/symsPerKey must be filled for further tests below, + * regardless of client-side flags */ + + if (!CheckKeyTypes(client, xkb, req, (xkbKeyTypeWireDesc **) &values, + &nTypes, mapWidths, doswap)) { client->errorValue = nTypes; return BadValue; } - /* symsPerKey/mapWidths must be filled regardless of client-side flags */ map = &xkb->map->key_sym_map[xkb->min_key_code]; for (i = xkb->min_key_code; i < xkb->max_key_code; i++, map++) { register int g, ng, w; @@ -5157,7 +5156,7 @@ } static Status -_CheckSetDoodad(char **wire_inout, +_CheckSetDoodad(char **wire_inout, xkbSetGeometryReq *req, XkbGeometryPtr geom, XkbSectionPtr section, ClientPtr client) { char *wire; @@ -5168,6 +5167,9 @@ Status status; dWire = (xkbDoodadWireDesc *) (*wire_inout); + if (!_XkbCheckRequestBounds(client, req, dWire, dWire + 1)) + return BadLength; + any = dWire->any; wire = (char *) &dWire[1]; if (client->swapped) { @@ -5270,7 +5272,7 @@ } static Status -_CheckSetOverlay(char **wire_inout, +_CheckSetOverlay(char **wire_inout, xkbSetGeometryReq *req, XkbGeometryPtr geom, XkbSectionPtr section, ClientPtr client) { register int r; @@ -5281,6 +5283,9 @@ wire = *wire_inout; olWire = (xkbOverlayWireDesc *) wire; + if (!_XkbCheckRequestBounds(client, req, olWire, olWire + 1)) + return BadLength; + if (client->swapped) { swapl(&olWire->name); } @@ -5292,6 +5297,9 @@ xkbOverlayKeyWireDesc *kWire; XkbOverlayRowPtr row; + if (!_XkbCheckRequestBounds(client, req, rWire, rWire + 1)) + return BadLength; + if (rWire->rowUnder > section->num_rows) { client->errorValue = _XkbErrCode4(0x20, r, section->num_rows, rWire->rowUnder); @@ -5300,6 +5308,9 @@ row = XkbAddGeomOverlayRow(ol, rWire->rowUnder, rWire->nKeys); kWire = (xkbOverlayKeyWireDesc *) &rWire[1]; for (k = 0; k < rWire->nKeys; k++, kWire++) { + if (!_XkbCheckRequestBounds(client, req, kWire, kWire + 1)) + return BadLength; + if (XkbAddGeomOverlayKey(ol, row, (char *) kWire->over, (char *) kWire->under) == NULL) { @@ -5333,6 +5344,9 @@ register int r; xkbRowWireDesc *rWire; + if (!_XkbCheckRequestBounds(client, req, sWire, sWire + 1)) + return BadLength; + if (client->swapped) { swapl(&sWire->name); swaps(&sWire->top); @@ -5358,6 +5372,9 @@ XkbRowPtr row; xkbKeyWireDesc *kWire; + if (!_XkbCheckRequestBounds(client, req, rWire, rWire + 1)) + return BadLength; + if (client->swapped) { swaps(&rWire->top); swaps(&rWire->left); @@ -5369,16 +5386,19 @@ row->left = rWire->left; row->vertical = rWire->vertical; kWire = (xkbKeyWireDesc *) &rWire[1]; - for (k = 0; k < rWire->nKeys; k++) { + for (k = 0; k < rWire->nKeys; k++, kWire++) { XkbKeyPtr key; + if (!_XkbCheckRequestBounds(client, req, kWire, kWire + 1)) + return BadLength; + key = XkbAddGeomKey(row); if (!key) return BadAlloc; - memcpy(key->name.name, kWire[k].name, XkbKeyNameLength); - key->gap = kWire[k].gap; - key->shape_ndx = kWire[k].shapeNdx; - key->color_ndx = kWire[k].colorNdx; + memcpy(key->name.name, kWire->name, XkbKeyNameLength); + key->gap = kWire->gap; + key->shape_ndx = kWire->shapeNdx; + key->color_ndx = kWire->colorNdx; if (key->shape_ndx >= geom->num_shapes) { client->errorValue = _XkbErrCode3(0x10, key->shape_ndx, geom->num_shapes); @@ -5390,14 +5410,14 @@ return BadMatch; } } - rWire = (xkbRowWireDesc *) &kWire[rWire->nKeys]; + rWire = (xkbRowWireDesc *)kWire; } wire = (char *) rWire; if (sWire->nDoodads > 0) { register int d; for (d = 0; d < sWire->nDoodads; d++) { - status = _CheckSetDoodad(&wire, geom, section, client); + status = _CheckSetDoodad(&wire, req, geom, section, client); if (status != Success) return status; } @@ -5406,7 +5426,7 @@ register int o; for (o = 0; o < sWire->nOverlays; o++) { - status = _CheckSetOverlay(&wire, geom, section, client); + status = _CheckSetOverlay(&wire, req, geom, section, client); if (status != Success) return status; } @@ -5440,6 +5460,9 @@ xkbOutlineWireDesc *olWire; XkbOutlinePtr ol; + if (!_XkbCheckRequestBounds(client, req, shapeWire, shapeWire + 1)) + return BadLength; + shape = XkbAddGeomShape(geom, shapeWire->name, shapeWire->nOutlines); if (!shape) @@ -5450,21 +5473,27 @@ XkbPointPtr pt; xkbPointWireDesc *ptWire; + if (!_XkbCheckRequestBounds(client, req, olWire, olWire + 1)) + return BadLength; + ol = XkbAddGeomOutline(shape, olWire->nPoints); if (!ol) return BadAlloc; ol->corner_radius = olWire->cornerRadius; ptWire = (xkbPointWireDesc *) &olWire[1]; - for (p = 0, pt = ol->points; p < olWire->nPoints; p++, pt++) { - pt->x = ptWire[p].x; - pt->y = ptWire[p].y; + for (p = 0, pt = ol->points; p < olWire->nPoints; p++, pt++, ptWire++) { + if (!_XkbCheckRequestBounds(client, req, ptWire, ptWire + 1)) + return BadLength; + + pt->x = ptWire->x; + pt->y = ptWire->y; if (client->swapped) { swaps(&pt->x); swaps(&pt->y); } } ol->num_points = olWire->nPoints; - olWire = (xkbOutlineWireDesc *) (&ptWire[olWire->nPoints]); + olWire = (xkbOutlineWireDesc *)ptWire; } if (shapeWire->primaryNdx != XkbNoShape) shape->primary = &shape->outlines[shapeWire->primaryNdx]; @@ -5561,12 +5590,15 @@ return status; for (i = 0; i < req->nDoodads; i++) { - status = _CheckSetDoodad(&wire, geom, NULL, client); + status = _CheckSetDoodad(&wire, req, geom, NULL, client); if (status != Success) return status; } for (i = 0; i < req->nKeyAliases; i++) { + if (!_XkbCheckRequestBounds(client, req, wire, wire + XkbKeyNameLength)) + return BadLength; + if (XkbAddGeomKeyAlias(geom, &wire[XkbKeyNameLength], wire) == NULL) return BadAlloc; wire += 2 * XkbKeyNameLength; @@ -6551,7 +6583,8 @@ static char * CheckSetDeviceIndicators(char *wire, DeviceIntPtr dev, - int num, int *status_rtrn, ClientPtr client) + int num, int *status_rtrn, ClientPtr client, + xkbSetDeviceInfoReq * stuff) { xkbDeviceLedsWireDesc *ledWire; int i; @@ -6559,6 +6592,11 @@ ledWire = (xkbDeviceLedsWireDesc *) wire; for (i = 0; i < num; i++) { + if (!_XkbCheckRequestBounds(client, stuff, ledWire, ledWire + 1)) { + *status_rtrn = BadLength; + return (char *) ledWire; + } + if (client->swapped) { swaps(&ledWire->ledClass); swaps(&ledWire->ledID); @@ -6586,6 +6624,11 @@ atomWire = (CARD32 *) &ledWire[1]; if (nNames > 0) { for (n = 0; n < nNames; n++) { + if (!_XkbCheckRequestBounds(client, stuff, atomWire, atomWire + 1)) { + *status_rtrn = BadLength; + return (char *) atomWire; + } + if (client->swapped) { swapl(atomWire); } @@ -6597,6 +6640,10 @@ mapWire = (xkbIndicatorMapWireDesc *) atomWire; if (nMaps > 0) { for (n = 0; n < nMaps; n++) { + if (!_XkbCheckRequestBounds(client, stuff, mapWire, mapWire + 1)) { + *status_rtrn = BadLength; + return (char *) mapWire; + } if (client->swapped) { swaps(&mapWire->virtualMods); swapl(&mapWire->ctrls); @@ -6648,11 +6695,6 @@ xkbIndicatorMapWireDesc *mapWire; XkbSrvLedInfoPtr sli; - if (!_XkbCheckRequestBounds(client, stuff, ledWire, ledWire + 1)) { - *status_rtrn = BadLength; - return (char *) ledWire; - } - namec = mapc = statec = 0; sli = XkbFindSrvLedInfo(dev, ledWire->ledClass, ledWire->ledID, XkbXI_IndicatorMapsMask); @@ -6671,10 +6713,6 @@ memset((char *) sli->names, 0, XkbNumIndicators * sizeof(Atom)); for (n = 0, bit = 1; n < XkbNumIndicators; n++, bit <<= 1) { if (ledWire->namesPresent & bit) { - if (!_XkbCheckRequestBounds(client, stuff, atomWire, atomWire + 1)) { - *status_rtrn = BadLength; - return (char *) atomWire; - } sli->names[n] = (Atom) *atomWire; if (sli->names[n] == None) ledWire->namesPresent &= ~bit; @@ -6692,10 +6730,6 @@ if (ledWire->mapsPresent) { for (n = 0, bit = 1; n < XkbNumIndicators; n++, bit <<= 1) { if (ledWire->mapsPresent & bit) { - if (!_XkbCheckRequestBounds(client, stuff, mapWire, mapWire + 1)) { - *status_rtrn = BadLength; - return (char *) mapWire; - } sli->maps[n].flags = mapWire->flags; sli->maps[n].which_groups = mapWire->whichGroups; sli->maps[n].groups = mapWire->groups; @@ -6731,13 +6765,17 @@ } static int -_XkbSetDeviceInfo(ClientPtr client, DeviceIntPtr dev, +_XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev, xkbSetDeviceInfoReq * stuff) { char *wire; wire = (char *) &stuff[1]; if (stuff->change & XkbXI_ButtonActionsMask) { + int sz = stuff->nBtns * SIZEOF(xkbActionWireDesc); + if (!_XkbCheckRequestBounds(client, stuff, wire, (char *) wire + sz)) + return BadLength; + if (!dev->button) { client->errorValue = _XkbErrCode2(XkbErr_BadClass, ButtonClass); return XkbKeyboardErrorCode; @@ -6748,13 +6786,13 @@ dev->button->numButtons); return BadMatch; } - wire += (stuff->nBtns * SIZEOF(xkbActionWireDesc)); + wire += sz; } if (stuff->change & XkbXI_IndicatorsMask) { int status = Success; wire = CheckSetDeviceIndicators(wire, dev, stuff->nDeviceLedFBs, - &status, client); + &status, client, stuff); if (status != Success) return status; } @@ -6765,8 +6803,8 @@ } static int -_XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev, - xkbSetDeviceInfoReq * stuff) +_XkbSetDeviceInfo(ClientPtr client, DeviceIntPtr dev, + xkbSetDeviceInfoReq * stuff) { char *wire; xkbExtensionDeviceNotify ed; @@ -6790,8 +6828,6 @@ if (stuff->firstBtn + stuff->nBtns > nBtns) return BadValue; sz = stuff->nBtns * SIZEOF(xkbActionWireDesc); - if (!_XkbCheckRequestBounds(client, stuff, wire, (char *) wire + sz)) - return BadLength; memcpy((char *) &acts[stuff->firstBtn], (char *) wire, sz); wire += sz; ed.reason |= XkbXI_ButtonActionsMask; diff -Nru xorg-server-21.1.3/ylwrap xorg-server-21.1.4/ylwrap --- xorg-server-21.1.3/ylwrap 2022-01-02 22:42:12.000000000 +0000 +++ xorg-server-21.1.4/ylwrap 2022-07-12 13:28:12.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # Written by Tom Tromey . #