Commit Graph

1046 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult ee302a1ac0 (submit/drop-obsolete-have-dix-config.h) drop obsolete HAVE_DIX_CONFIG_H
The symbol controls whether to include dix-config.h, and it's always set,
thus we don't need it (and dozens of ifdef's) anymore.

This commit only removes them from our own source files, where we can
guarantee that dix-config.h is present - leaving the (potentially exported)
headers untouched.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:21 +02:00
Enrico Weigelt, metux IT consult 68c560322f (submit/property.h) dix: unexport dixLookupProperty()
It's not used by any drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:21 +02:00
Enrico Weigelt, metux IT consult 11fe7c5654 (submit/miext-extinit) miext: move over extinit_priv.h from include
Since most of the extension init logic (and on/off switches for them)
is driven from miext, this seems the appropriate place for the header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:20 +02:00
Enrico Weigelt, metux IT consult 7c4e2dc1a4 (submit/miext-extinit) treewide: clean up remaining consumers of extinit.h
Several sources including it without need. For consistency, those who still
need someting from there should include exitinit_priv.h (which also pulls
in extinit.h)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:20 +02:00
Enrico Weigelt, metux IT consult 948e288d2c (submit/miext-extinit) xtest: unexport noTestExtensions field
This field isn't used by any drivers, and also better belongs into
the corresponding extension instead of OS adaption layer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:20 +02:00
Enrico Weigelt, metux IT consult 9a6a2574e9 (submit/xquartz-unused-code) xquartz: drop unused code
These code pieces have been commented out since their introduction back
almost two decades ago, so probably no need for them anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:20 +02:00
Enrico Weigelt, metux IT consult d5dddfd48c (submit/fixup-req-len) xquartz: drop swapping request length fields
The request struct's length fields aren't used anymore - we have the
client->req_len field instead, which also is bigreq-compatible.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:20 +02:00
Enrico Weigelt, metux IT consult a7d0197217 (submit/fixup-req-len) xquartz: fix length checking with bigreq
The authorative source of the request frame size is client->req_len,
especially with big requests larger than 2^18 bytes.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-08-29 20:51:19 +02:00
Enrico Weigelt, metux IT consult b30edf326b fix missing includes of <X11/Xfuncproto.h>
Several places using _X_ATTRIBUTE_PRINTF macro from X11/Xfuncproto.h
but missing to include it, so it depends on other headers whether it's
included by mere accident, which quickly causes trouble if include order
changes. Cleaning that up by adding explicit include statements.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1580>
2024-07-20 17:18:38 +00:00
Alan Coopersmith 522f469fe9 Move sizeof to second argument in calloc calls
Clears -Wcalloc-transposed-args warnings from gcc 14.1, such as:

../dix/main.c:165:42: warning: ‘calloc’ sizes specified with ‘sizeof’ in the
 earlier argument and not in the later argument [-Wcalloc-transposed-args]
  165 |             serverClient = calloc(sizeof(ClientRec), 1);
      |                                          ^~~~~~~~~
../dix/main.c:165:42: note: earlier argument should specify number of
 elements, later size of each element

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1606>
2024-07-19 23:45:21 +00:00
Enrico Weigelt, metux IT consult e5c8b664d3 os: unexport ddx callbacks
The DDX callbacks (where core/DIX calls into DDX) aren't supposed to be
called by drivers directly, so unexport them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1332>
2024-05-08 09:37:35 +02:00
Olivier Fourdan a7ba1e9fe4 xquartz: Remove invalid Unicode sequence
This is flagged by the automatic scanning tools.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1673
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1524>
2024-05-07 22:26:34 +00:00
Enrico Weigelt, metux IT consult 33350ef8ff include: move private definitions out of extinit.h
Public server module API shouldn't be clobbered with private definitions,
thus move them out to extinit_priv.h.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1289>
2024-04-30 00:47:38 +00:00
Enrico Weigelt, metux IT consult 5057c716eb Fix missing include of sys/stat.h
Instead of relying on very indirect includes, it's more more clean when
everybody explicitly includes what he really needs.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1417>
2024-04-17 10:55:10 +02:00
Enrico Weigelt, metux IT consult be4c8444eb os: unexport Os*() functions
These aren't called (and suited for being called) by drivers,
thus drop them from the public module API.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1381>
2024-04-16 14:20:30 +02:00
Enrico Weigelt, metux IT consult 232cad9ec3 prevent name clash on Windows w/ RT_* defines
Windows' native headers using some our RT_* define's names for other things.
Since the naming isn't very nice anyways, introducing some new ones
(X11_RESTYPE_NONE, X11_RESTYPE_FONT, X11_RESTYPE_CURSOR) and define the old
ones as an alias to them, in case some out-of-tree code still uses them.

With thins change, we don't need to be so extremely careful about include
ordering and have explicit #undef's in order to prevent name clashes on
Win32 targets.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1355>
2024-04-15 18:59:23 -07:00
Alan Coopersmith 6c684d035c Xquartz: ProcAppleDRICreatePixmap needs to use unswapped length to send reply
CVE-2024-31082

Fixes: 14205ade0 ("XQuartz: appledri: Fix byte swapping in replies")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1463>
2024-04-02 19:19:40 -07:00
Enrico Weigelt, metux IT consult 94e5252365 xquartz: fix missing include of <errno.h>
It's much cleaner to always include directly what one needs,
instead of relying on very indirect including.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1435>
2024-03-21 17:32:30 +01:00
Peter Hutterer 924939c886 Revert "Fix missing includes of <errno.h>"
Removing errno from xf86_OSlib.h breaks the xf86-input-mouse driver
build. And xf86_OSlib.h itself relies on errno anyway in the SYSCALL
macro provided by this header.

This reverts commit f6a367102c.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1423>
2024-03-19 00:33:26 +00:00
Enrico Weigelt, metux IT consult f6a367102c Fix missing includes of <errno.h>
It's much cleaner to always include directly what one needs,
instead of relying on very indirect including.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1416>
2024-03-18 22:58:32 +00:00
Enrico Weigelt, metux IT consult eed0697ec9 os: consolidate busfault handling
The symbols HAVE_SIGACTION and BUSFAULT are set under the same conditions,
so can be consolidated into one. Also define dummies when HAVE_SIGACTION
is not set, so a few #ifdef's less clutterig the code.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1297>
2024-02-23 23:15:12 +00:00
Jeremy Huddleston Sequoia 2567388a29 xquartz: Disable COMPOSITE at runtime
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2023-01-17 15:17:45 -08:00
Jeremy Huddleston Sequoia 15077090d3 xquartz: Update the about box copyright to 2023
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2023-01-17 07:33:38 -08:00
Jeremy Huddleston Sequoia d1a9a50792
xquartz: Use xorg_backtrace() instead of rolling our own for debugging
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-12-21 01:21:52 -08:00
Jeremy Huddleston Sequoia 9a66690eaf
xquartz: Ignore SIGPIPE at process launch
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-12-21 01:21:50 -08:00
Jeremy Huddleston Sequoia f73c489771
xquartz: Fix some formatting
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-12-14 00:17:59 -08:00
John D Pell 3fd87692e8
XQuartz: stub: Call LSOpenApplication instead of fork()/exec()
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-12-14 00:17:57 -08:00
Jeremy Huddleston Sequoia e654de80ed
xquartz: Move default applications list outside of the main executable
This will allow side-wide customization.

Fixes: https://github.com/XQuartz/XQuartz/issues/274
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-11-24 11:15:44 -08:00
Jeremy Huddleston Sequoia 3dbd809c0e
xquartz: Remove unused macro (X11LIBDIR)
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-11-24 11:15:42 -08:00
Jeremy Huddleston Sequoia 4cfdc5af31 XQuartz: Improve type safety for X11Controller's application menu editor
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-07-02 14:24:43 -07:00
Jeremy Huddleston Sequoia dfd057996b 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 <jeremyhu@apple.com>
2022-07-02 14:24:42 -07:00
Jeremy Huddleston Sequoia aa636b97c6 xquartz: Use correct defines when building to support Sparkle updates
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-07-01 14:28:54 -07:00
Jeremy Huddleston Sequoia 9ce7264889 XQuartz: Add TCC reason keys to Info.plist
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-06-26 13:25:03 -07:00
Jeremy Huddleston Sequoia b00cf4aef8 XQuartz: Build the bundle trampoline when using meson
This brings the change for e1fdc856ae into meson based builds

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-06-26 02:43:38 -07:00
Jeremy Huddleston Sequoia 4f5999826a meson: Provide options to set CFBundleVersion and CFBundleVersionString in XQuartz
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-06-19 23:10:00 -07:00
Jeremy Huddleston Sequoia b12f5dc62d xquartz: Update copyright for 2022
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-06-19 22:20:26 -07:00
Jeremy Huddleston Sequoia 1d90bef30c xquartz: Update Sparkle configuration to use SUPublicEDKey
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-06-19 22:20:26 -07:00
Jeremy Huddleston Sequoia 4532b696c6 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 <jeremyhu@apple.com>
2022-06-16 07:27:03 -07:00
Jeremy Huddleston Sequoia f40610e0b4 xquartz: Fold spaces related preferences into NSUserDefaults+XQuartzDefaults
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-06-14 22:23:35 -07:00
Jeremy Huddleston Sequoia 6134c73aeb xquartz pbproxy: Adopt NSUserDefaults+XQuartzDefaults for preferences
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-06-14 22:23:33 -07:00
Jeremy Huddleston Sequoia 963ba6d9ad xquartz: Create a separate category for organizing user preferences
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-06-14 22:20:11 -07:00
Jeremy Huddleston Sequoia b1afcecc61 X11Application: Ensure TIS operations are done on the main thread
Fixes: https://github.com/XQuartz/XQuartz/issues/205
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2022-06-13 22:01:06 -07:00
Alan Coopersmith 6f9fce0360 Replace "the the" with a single "the" in docs & comments
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Martin Roukala <martin.roukala@mupuf.org>
2022-03-31 13:27:57 -07:00
Povilas Kanapickas c97397dc47 Remove autotools support
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2021-10-27 13:15:40 +03:00
Edouard Gaulué 199f278a1b French text in Preferences Pane Review 2021-04-07 16:19:24 -07:00
Jeremy Huddleston Sequoia 65b27d82f2 xquartz: Call PseudoramiXExtensionInit() through InitOutput() just like xwin
Fixes: https://github.com/XQuartz/XQuartz/issues/140
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2021-04-07 16:11:59 -07:00
Jeremy Huddleston Sequoia 4ae36f418e xquartz: Ensure the mouse pointer is shown when switching to a native macOS alert or window
Fixes: https://github.com/XQuartz/XQuartz/issues/100
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2021-03-08 21:03:57 -08:00
Jeremy Huddleston Sequoia 15a413e11d xquartz: Update meson build to remove deleted files
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2021-03-05 23:17:21 -08:00
Jeremy Huddleston Sequoia e59848548a xquartz: Fix appFlags build failure with macOS 10.15+ SDKs
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2021-03-05 23:17:21 -08:00
Jeremy Huddleston Sequoia 9d329a0fb1 xquartz: Remove a check for NSAppKitVersionNumber >= NSAppKitVersionNumber10_7
This check is always true on our supported systems.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2021-02-22 09:20:25 -08:00