Commit Graph

9841 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult c6777fe48e xnest: drop unused DarwinHandleGUI()
Obsolete since 17 years now, probably just forgotten to clean up.

Fixes: ef1c520537
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:10:02 +02:00
Enrico Weigelt, metux IT consult 2f46a02217 vfb: drop unused DarwinHandleGUI()
Obsolete since 17 years now, probably just forgotten to clean up.

Fixes: ef1c520537
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:10:02 +02:00
Enrico Weigelt, metux IT consult 93013224b4 xquartz: fix incomplete prototype of executable_path()
> ../hw/xquartz/mach-startup/bundle_trampoline.c:53:29: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
> static char *executable_path() {
>                             ^
>                              void
> 1 warning generated.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:09:33 +02:00
Enrico Weigelt, metux IT consult 74d5b7bb05 xquartz: drop unused field declarations in request handlers
Silence compiler warning on unused fields, eg.:

> ../hw/xquartz/applewm.c:692:5: warning: unused variable 'stuff' [-Wunused-variable]
>     REQUEST(xAppleWMQueryVersionReq);
>     ^
> ../include/dix.h:65:12: note: expanded from macro 'REQUEST'
>     type * stuff = (type *)client->requestBuffer;
>            ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:08:46 +02:00
Enrico Weigelt, metux IT consult 2069db50e7 xfree86: compat: make xf86MsgVerb() a bit less noisier
print the driver bug warning only once.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-03 16:55:14 +02:00
Enrico Weigelt, metux IT consult c24372893b xfree86: compat: consolidate logging
Consolidate the redundant warnings into generic functions.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-01 17:11:28 +02:00
Enrico Weigelt, metux IT consult 28e739e05b xfree86: loadmod: locally scope the errtype variable
In CheckVersion() the errtype variable is used in two separate scopes,
but not globally, so it's cleaner to have it only in the scopes that
are actually using it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-01 17:03:12 +02:00
stefan11111 3d266528a9 kdrive: ephyr: use c99 struct initialization
For better readability and robustness against future changes, it's
better to use named struct initializers instead of array-like lists.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-01 16:50:01 +02:00
Enrico Weigelt, metux IT consult 6a3162d623 Xnest: fix analyzer warning on uninitialized `DefaultVisual`
In xnestOpenScreen(), some compilers/analyzers spitting out a false alarm on
`defaultVisual` field potentially used uninitialized. This can't practically
happen, but not all compilers/analyzers really can see that.

Adding a zero initializer doesn't cost us anything, so silencing that false
alarm is trivial.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 20:30:46 +02:00
notbabaisyou 461411c798 modesetting: allow enabling atomic mode.
The Linux kernel has long had code preventing Xorg from using atomic
modesetting due to various bugs in it's implementation, some of these
issues have since been fixed but some issues remain namely with DPMS
and other smaller things, we should allow users to opt-in by setting
"Option 'Atomic' 'True'"

This shouldn't cause any issues as the feature remains disabled by default.

Co-authored-by: Daniel Abrecht <public@danielabrecht.ch>
Signed-off-by: notbabaisyou <though-went-some-simple@proton.me>
2025-06-27 19:23:31 +02:00
notbabaisyou 4afcb1cd7b modesetting: Fix typo.
`modsetCreateScreenResources` -> `modesetCreateScreenResources`

Signed-off-by: notbabaisyou <though-went-some-simple@proton.me>
2025-06-27 17:10:33 +02:00
Mike Gelfand 4f7000f620 xquartz: add missing include for `XkbSetRulesDflts`
Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 14:30:27 +02:00
Mike Gelfand 3e89bd7409 xquartz: add missing include for `DeliverEvents`
Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 14:30:27 +02:00
Mike Gelfand edb020e306 xquartz: depend on libXdmcp (includes osdep.h which includes X11/Xdmcp.h)
Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 14:30:27 +02:00
Mike Gelfand d89b3596f0 xquartz: depend on libX11 (includes X11/Xlib.h)
Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 14:30:27 +02:00
Mike Gelfand c06a2a3ed7 hw: add/fix include guards where missing/broken
Skipped headers designed for multiple or non-trivial inclusion:
* hw/xfree86/dri2/pci_ids/i810_pci_ids.h
* hw/xfree86/dri2/pci_ids/i915_pci_ids.h
* hw/xfree86/dri2/pci_ids/i965_pci_ids.h
* hw/xfree86/dri2/pci_ids/r200_pci_ids.h
* hw/xfree86/dri2/pci_ids/r300_pci_ids.h
* hw/xfree86/dri2/pci_ids/r600_pci_ids.h
* hw/xfree86/dri2/pci_ids/radeon_pci_ids.h
* hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h
* hw/xfree86/dri2/pci_ids/virtio_gpu_pci_ids.h
* hw/xfree86/dri2/pci_ids/vmwgfx_pci_ids.h

Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 13:58:05 +02:00
Enrico Weigelt, metux IT consult 828f9a1b7f xfree86: man: fix git URL
fix the git URL to point to Xlibre repository.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-23 16:50:19 +02:00
stefan11111 0746e6841a xfree86: compat: fix Ones for compilers where __builtin_popcountl is missing
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-06-23 14:14:48 +02:00
Enrico Weigelt, metux IT consult 3f5e4b1d97 xfree86: provide xf86DisableGeneralHandler() for Nvidia driver
The proprietary NVidia driver want's to call an internal function for reasons
unknown to us. Adding a little wrapper for it, that's also printing out some
warning message in the log.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-23 11:09:45 +02:00
Enrico Weigelt, metux IT consult fca07a761c xfree86: export xf86FlipPixels() but keep it internal
Needed by the int10 module, so has to be in the symbol table.
But still not supposed to be used by out-of-tree drivers.

Reported-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-20 18:36:29 +02:00
Enrico Weigelt, metux IT consult e523724d5e xfree86: export xf86ModeStatusToString() but keep it internal
Needed by the int10 module, so has to be in the symbol table.
But still not supposed to be used by out-of-tree drivers.

Reported-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-20 18:36:29 +02:00
Enrico Weigelt, metux IT consult 711359b75c xfree86: export xf86FindScreenForEntity() but keep it internal
Needed by the int10 module, so has to be in the symbol table.
But still not supposed to be used by out-of-tree drivers.

Reported-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-20 18:36:29 +02:00
Enrico Weigelt, metux IT consult f5777ff1dc xfree86: export xf86IsEntityPrimary() but keep it internal
Needed by the int10 module, so has to be in the symbol table.
But still not supposed to be used by out-of-tree drivers.

Reported-by: stefan11111 <stefan11111@shitposting.expert>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-20 18:36:29 +02:00
Enrico Weigelt, metux IT consult 66547c7971 xfree86: provide xf86EnableGeneralHandler() for Nvidia driver
The proprietary NVidia driver want's to call an internal function for reasons
unknown to us. Adding a little wrapper for it, that's also printing out some
warning message in the log.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-20 18:35:59 +02:00
Steven Van Dorp 2ef1e7728e ephyr: fix checking the same expression twice
Probably was a copy-paste error.
Intention is to check if the string is valid
(i.e. not null and length isn't 0).

fixes: #179

Signed-off-by: Steven Van Dorp <steven@vandorp.lu>
2025-06-19 13:57:57 +02:00
Steven Van Dorp b393d5fc02 ephyr: Add -host-grab to set custom grab shortcut
Allows for calling Xephyr with `-host-grab [keys]` to customize the
keyboard shortcut for grabbing/releasing keyboard and mouse input.
Fully backwards compatible:
Omitting `-host-grab` defaults to ctrl+shift.
`-no-host-grab` acts the same as before.

Closes: #134

Signed-off-by: Steven Van Dorp <steven@vandorp.lu>
2025-06-18 13:23:58 +02:00
Duje Mihanović 61accf16e2 Revert "xfree86: unexport xf86PostButtonEventM()"
This reverts commit e16424212e.

The xf86-input-wacom driver requires this function.

Signed-off-by: Duje Mihanović <duje@dujemihanovic.xyz>
2025-06-17 20:47:17 +02:00
Olivier Fourdan 923837e2c9 xfree86: Check for RandR provider functions
Changing XRandR provider properties if the driver has set no provider
function such as the modesetting driver will cause a NULL pointer
dereference and a crash of the Xorg server.

Related to CVE-2025-49180

This issue was discovered by Nils Emmerich <nemmerich@ernw.de> and
reported by Julian Suleder via ERNW Vulnerability Disclosure.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2024>
2025-06-17 20:01:25 +02:00
Enrico Weigelt, metux IT consult c8b81fdbc5 drop Xwayland
It always had it's own lifecycle (not been part of Xorg releases),
doesn't make sense to maintain a competing implementation that we
won't use anyways.

Once that's gone, we can also drop few things in core/dix that had
been added just for xwayland only.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-17 12:51:36 +02:00
stefan11111 fa7cc111e7 xfree86: compat: add missing symbols needed by the proprietary nvidia drivers
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-06-16 20:07:18 +02:00
dasha_uwu a776156b54 treewide: preemptively revert !1714 where it affects ABI compatibility
this adds dummy pointers in place of removed fields in some structs, only for
SDK headers, to preserve ABI
some of these fix segfaults for nvidia driver, some are preemptive

Signed-off-by: dasha_uwu <dasha@linuxping.win>
2025-06-16 10:32:48 +02:00
Steven Van Dorp 9acf6a4b63 ephyr: explicitly zero-initialize ephyrCursorScreen
Signed-off-by: Steven Van Dorp <steven@vandorp.lu>
2025-06-14 17:28:13 +02:00
Steven Van Dorp c5f63fa138 ephyr: fix possible segfault if eyphrCursorScreen is 0
Fixes: #38

Signed-off-by: Steven Van Dorp <steven@vandorp.lu>
2025-06-14 17:28:13 +02:00
rendick cd2e185838 Xnest: implement a defined initialization order in BoxRec
Signed-off-by: rendick <rendick123@proton.me>
2025-06-13 19:15:41 +02:00
cat a0f4a5585d Rebrand 'X.Org X Server' to 'XLibre X Server'
Signed-off-by: cat <cat@plan9.rocks>
2025-06-13 19:08:11 +02:00
dec05eba 8c3c20f3fe xnest/os: Fix incorrect power of two operator
2^16 is 2 xor 16 which equals 18, not 2 to the power of 16 which is 65536

Signed-off-by: dec05eba <dec05eba@protonmail.com>
2025-06-13 13:27:25 +02:00
dec05eba f397039d65 xres/xkb/xvmc/modesetting: Fix incorrect pointer data size usage
* xled change tested with `xset led named "Scroll Lock"`
* modesetting change tested with `xrandr --output DP-1 --gamma 0.5:0.5:0.5`.
  Without this fix that command does nothing
* xvmc change tested with `mpv --vo=xv video.mp4`

Of the currently reported issues this fixes #104

Signed-off-by: dec05eba <dec05eba@protonmail.com>
2025-06-13 13:01:24 +02:00
Enrico Weigelt, metux IT consult a75a587370 xfree86: mark xf86configptr exported for Nvidia legacy
Nvidia has a strange habit of messing with really internal stuff,
so need to add it to the executable's symbol table.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult e6467895f9 dix: add dixAllocServerXID()
Adding a separate function for allocating server-client's XIDs.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult 49c6431695 xfree86: add per major-version driver/module subdirectories
Modules are now placed into a sub-directory by major Xserver release,
so we have less hassle with trying to load drivers w/ incompatible ABI.

The legacy directories are still searched (after the versioned ones)
for backwards compat with badly maintained proprietary drivers (Nvidia).

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult a58dba71bd Revert "(!1991) xfree86: xf86Option: unexport xf86MarkOptionUsedByName()"
Reverting commit 63c8a689c3 on request by Nvidia
(proprietary driver)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult f25bf57cc2 xfree86: compat: re-export MarkClientException() for horryibly maintained Nvidia
NVidia yet again doing crazy shit in their proprietary drivers:

This is an DIX-*internal* function for triggering client teardown when
connection broke or somehow lack of resources to accept new connections.
Video drivers have no business with that whatsoever - having them messing
with client client connections is just insane.

But still trying to be kind with Nvidia victims, thus adding a little wrapper
function under the old name. It spills out a log warning calling users to file
bug reports their driver vendor.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult 6a3b60cfe7 xfree86: increase ABI versions
Since *a lot* has changed since last Xserver release, need to increase
the ABI version.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult c8a776f662 xfree86: compat: re-add xf86Msg() for badly maintained drivers.
NVidia yet again lagging behind a year with trivial cleanups,
even though they're informed about this function being deprecated
and dropped.

It spills out a log warning calling users to file bug reports their
driver vendor.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult 3d21a15f54 xfree86: fix possible buffer overflow in xf86PrintBanner()
There's chance of buffer overflow happending due lack of zero-termination
of printed string. Making sure the buffer is always propertly terminated.

See: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1821

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult 329b7c8631 xfree86: xf86Priv.h: unexport xf86HasTTYs()
Not used by any external drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult 806748ddd4 xfree86: xf86Priv.h: unexport xf86CallDriverProbe()
Not used by any external drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult 86b05c5fae xfree86: xf86Priv.h: unexport xf86LoadModules()
Not used by any external drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult 2af74d6985 xfree86: xf86Priv.h: unexport xf86CloseLog()
Not used by any external drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult bb89c30942 xfree86: xf86Priv.h: unexport xf86LogInit()
Not used by any external drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00