Commit Graph

22678 Commits

Author SHA1 Message Date
hongao
f0a679cfb2 randr: clear primary screen's primaryOutput when the output is deleted
This fix use after free when a pluggable gpu screen (such as displaylink)
was set as primary screen and unpluged.

gdb backtrace:
```
 0 OssigHandler (signo=11, sip=0x7fff2e0a50f0, unused=0x7fff2e0a4fc0) at ../../../../os/osinit.c:138
 1 <signal handler called>
 2 rrGetscreenResources (client=0x3195160, query=0) at ../../../../randr/rrscreen.c:577
 3 0x0000000000562bae in ProcRRGetscreenResourcesCurrent (client=0x3195160) at ../../../../randr/rrscreen.c:652
 4 OxOOOOB0000054de63 in ProcRRDispatch (client=0x3195160) at ../../../../randr/randr.c:717
 5 0x00000000004322c6 in Dispatch () at ../../../../dix/dispatch.c:485
 6 0x0900900990443139 in dix_main (argc=12, argv=0x7fff2e0a5f78, envp=0x7fff2e0a5fe0) at ../../../../dix/main.c:276
 7 0X0000000000421d9a in main (argc=12, argv=0x7fff2e0a5f78, envp=0x7fff2e0a5fe0) at ../../../../dix/stubmain.c:34
```

Signed-off-by: hongao <hongao@uniontech.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1553>
2026-03-16 13:16:39 +01:00
Benjamin Valentin
7ffd763439 xf86: check return value of XF86_CRTC_CONFIG_PTR in xf86CompatOutput()
If privates[xf86CrtcConfigPrivateIndex].ptr is NULL, this will cause
a segfault.

Possible fix for https://gitlab.freedesktop.org/xorg/xserver/-/issues/1241

Signed-off-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/835>
2026-03-16 13:14:07 +01:00
Jon Turney
3ac5886879 hw/xwin: Allow DefWindowProc to SetFocus() as needed after WM_ACTIVE
Don't indicate we've processed WM_ACTIVATE, so DefWindowProc can do
not-clearly specified default things with the focus.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/736>
2026-03-16 13:12:29 +01:00
Jon Turney
0decf12c56 hw/xwin: More adjustments to multiwindow mode focus handling
The previous change is not enough, as WM_KILLFOCUS can apparently be
sent to the window losing focus after WM_ACTIVATE has been sent to
the window gaining focus.

Try using WM_SETFOCUS instead, as that has the correct ordering and seems
more logical.

The test "!pWin || !pWin->overrideRedirect" is confusingly written: It's
true if:

(a) pWin is NULL (= X window doesn't exist, shouldn't happen), or
(b) pWin->overrideRedirect is FALSE

i.e. the intended effect is "don't give focus to override redirect windows"

There seem to be some cases where this still isn't quite correct: A
reproduction isn't known, but it seems to be related to minimizing a
maximized Windows window, and having window activation move to a
maximized X window beneath it.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/736>
2026-03-16 13:12:29 +01:00
Jon Turney
0adc6ff90f hw/xwin: Always set the X input focus to none when an X window loses focus
In the multiwindow WM, we need to cancel the X input focus if the
Windows input focus has gone to the desktop, or another application's
window.

We could maybe avoid some unneeded work by not doing this if the
WM_KILLFOCUS wParam is another window owned by us, which is immediately
going to be given the X input focus.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/736>
2026-03-16 13:12:29 +01:00
Jon Turney
3954f766af hw/xwin: Use revert-to-parent X focus mode in multiwindow WM
Use revert-to-parent X focus mode, as recommended in ICCCM 4.1.7

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/736>
2026-03-16 13:12:29 +01:00
Diego Viola
639551d032 treewide: fix typos
Signed-off-by: default avatarDiego Viola <diego.viola@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2138>

---------------------------------------------------------------------------

One of the spelling errors was moved to another file and fixed there

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-03-16 13:11:07 +01:00
stefan11111
e6a0fa4b0c Treewide: Fix typos
Signed-off-by: Diego Viola <diego.viola@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2134>

----------------------------------------------------------------------------

This commit is the result of `git apply commit.diff --reject`
applied on e8f4522312

67c82078fe does not
apply to Xlibre

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-03-16 13:11:07 +01:00
Alan Coopersmith
3783d7eeee xfree86: issue error if too many clocks entries are listed in config
Changes message issued for too many clocks from the confusing:
    "29.0" is not a valid keyword in this section.
to the more obvious:
    More than 128 Clocks defined.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2130>
Fixes: https://github.com/X11Libre/xserver/issues/1407
Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1851
Fixes: https://github.com/X11Libre/xserver/pull/1416
2026-03-16 13:08:04 +01:00
Alan Coopersmith
e4d55c4453 ephyr: show that -name & -title take non-optional arguments in usage output
Fixes: f028e245a7 ("Bug #10016: Implement WM_CLASS hints in Xephyr.")
Fixes: e3c65cf1df ("xephyr: Add -title option.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2137>
2026-03-16 13:06:53 +01:00
Alan Coopersmith
6e3afd4be4 ephyr: add -name to Xephyr man page
Fixes: f028e245a7 ("Bug #10016: Implement WM_CLASS hints in Xephyr.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2137>
2026-03-16 13:06:53 +01:00
Alan Coopersmith
bee767c000 ephyr: add -title to Xephyr man page
Fixes: e3c65cf1df ("xephyr: Add -title option.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2137>
2026-03-16 13:06:53 +01:00
Alan Coopersmith
465742c7b4 os: add a generic -verbose option instead of making each server add its own
Replaces Xwayland's server-specific implementation, but leaves Xorg's
since it sets global variables in the xfree86 ddx layer.  Also leaves
Xephyr's differently-spelled "-verbosity" for backwards compatibility.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2131>
2026-03-16 13:06:32 +01:00
Alan Coopersmith
3ee086b897 os: fix sha1 build error with Nettle 4.0
Nettle 2.6 (released in 2013) split the sha.h header into sha1.h & sha2.h,
but left the sha.h header for compatibility until the recent Nettle 4.0
release finally removed it.

Nettle 4.0 also dropped the length argument from the sha1_digest function.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1871
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2133>
2026-03-16 13:02:37 +01:00
Enrico Weigelt, metux IT consult
cb5f2cd67e .github: move run-xserver-build-and-test.sh under ubuntu/ subdir
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-18 11:22:21 +01:00
Enrico Weigelt, metux IT consult
6d6f2b3a98 .github: move some build & test pieces from pipeline to script
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-18 10:52:49 +01:00
Enrico Weigelt, metux IT consult
09fdd4ea55 .github: builder-xserver: change dependency package directory
Using the same one that MPBT is using.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-17 12:45:20 +01:00
Enrico Weigelt, metux IT consult
369f9a8b16 .github: builder-xserver: change meson build dir
Using the same meson build subdirectory that MPBT is using.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-17 11:46:40 +01:00
Enrico Weigelt, metux IT consult
f5295b8d36 .github: update XTS
use commit 6cf94400a09abecd6b86e4eb6441741acecd51f6

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-16 16:43:13 +01:00
Enrico Weigelt, metux IT consult
922c4e2843 .github: update piglit
Use piglit commit 59111996534f875ca88bce51f21fa2e6564895da.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-16 16:19:53 +01:00
Enrico Weigelt, metux IT consult
a208c9e015 drop obsolete .travis.yml
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-16 15:52:43 +01:00
Enrico Weigelt, metux IT consult
51a7ffdc52 drop obsolete .gitlab-ci.yml
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-16 15:52:28 +01:00
Joseph Crowell
8f542381da dri3: return 1.4 version if we can do 1.4
Signed-off-by: Joseph Crowell <joseph.w.crowell@gmail.com>
2026-02-16 15:17:26 +01:00
Joseph Crowell
2394c7c1cc dri3: update version check to include 1.1 check
Signed-off-by: Joseph Crowell <joseph.w.crowell@gmail.com>
2026-02-16 15:17:26 +01:00
Enrico Weigelt, metux IT consult
126eb37529 kdrive: linux: replace __uid_t and __gid_t by standard types
Fix build on musl.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-16 14:51:39 +01:00
Enrico Weigelt, metux IT consult
e1933ec5a7 meson.build: fix .pc and .m4 install on xorg-sdk-only build
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-14 14:30:39 +01:00
Enrico Weigelt, metux IT consult
1d27e2878a .github: build drivers against xorg-sdk without actual Xserver compile
Use the new xorg-sdk build type instead of building a complete Xserver,
to compile our drivers against.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-13 16:57:14 +01:00
Enrico Weigelt, metux IT consult
af0de5a0f4 xfree86: make xf86Sbus.h private
This header isn't actually included by any drivers (not even the sun* ones),
neither does it have any _X_EXPORT'ed symbols, nor structs that a driver
could use. Not relevant at all for proprietary Nvidia drivers, because their
cards never worked on Sbus.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-13 16:29:01 +01:00
Enrico Weigelt, metux IT consult
1e6c7be1df meson.build: don't compile anything when no DDX is enabled
The practical use case is just installing Xorg SDK headers for driver build,
but not having to actually compile anything.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-13 15:43:34 +01:00
Enrico Weigelt, metux IT consult
921215026f xfree86: ramdac: don't ifdef on HAVE_XORG_CONFIG_H
It's always present, so no need to ifdef on it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-13 14:00:57 +01:00
Enrico Weigelt, metux IT consult
7f8eeb5471 xfree86: sdksyms.sh: don't ifdef on HAVE_XORG_CONFIG_H anymore.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-13 14:00:49 +01:00
Enrico Weigelt, metux IT consult
3c11149ae0 randr: don't ifdef on RANDR_10_INTERFACE anymore
It's always present (and wont go away), so no need to ifdef on it.
Still keeping the symbols, until we're sure no drivers still depending
on it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-13 14:00:41 +01:00
Enrico Weigelt, metux IT consult
5d0dc36712 include: dont include xorg-config.h
Those public headers shouldn't ever attempt to include xorg-config.h.
All xfree86 source files need to include it at the very top anyway,
while drivers have to include xorg-server.h instead.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-13 14:00:33 +01:00
Enrico Weigelt, metux IT consult
bb821cf041 xfree86: utils: don't ifdef on HAVE_XORG_CONFIG_H anymore
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-13 14:00:12 +01:00
Enrico Weigelt, metux IT consult
528c7a95bd xfree86: vgahw: don't ifdef on HAVE_XORG_CONFIG_H anymore
it's always present, so no need to check for it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-13 13:59:54 +01:00
Enrico Weigelt, metux IT consult
fabb551d88 xfree86: shadowfb: don't ifdef on HAVE_XORG_CONFIG_H anymore
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-13 13:37:08 +01:00
Enrico Weigelt, metux IT consult
b6e5c98809 xfree86: xkb: don't ifdef on HAVE_XORG_CONFIG_H anymore
it's always present, so no need to check for it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-13 13:36:55 +01:00
Enrico Weigelt, metux IT consult
786ba60a07 xfree86: loader: don't ifdef on HAVE_XORG_CONFIG_H anymore
It's always present, so no need to ifdef on it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-13 13:12:44 +01:00
Enrico Weigelt, metux IT consult
54b23f986b xfree86: fbdev: don't ifdef on HAVE_XORG_CONFIG_H
it's always present here, so no need to ifdef on it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-13 12:35:07 +01:00
Enrico Weigelt, metux IT consult
b2e858ee80 meson.build: move build_xephyr and build_xfbdev to toplevel
These values are also used in at the toplevel, and we're going to
have more uses there for xorg-sdk-only builds.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-13 12:34:15 +01:00
Enrico Weigelt, metux IT consult
eb6b201c23 meson.build: separate option for only installing xorg sdk
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-13 12:33:58 +01:00
Enrico Weigelt, metux IT consult
7dad061eab xfree86: parser: dont ifdef on HAVE_XORG_CONFIG_H
The header is always present (we're inside xfree86), so no need
for that #ifdef.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-13 12:33:40 +01:00
Enrico Weigelt, metux IT consult
e085d839cc xfree86: ramdac: move over public SDK headers to include/
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-13 11:40:38 +01:00
Enrico Weigelt, metux IT consult
4764eb9a8a xfree86: int10: move public SDK headers to include/
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-13 10:25:17 +01:00
Enrico Weigelt, metux IT consult
3bd7f343c1 xfree86: shadowfb: move public SDK headers into include/
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-13 10:11:07 +01:00
Enrico Weigelt, metux IT consult
dda087c554 xfree86: parser: move public SDK headers into include/
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-12 20:00:11 +01:00
Enrico Weigelt, metux IT consult
a1081d7765 xfree86: common: move public SDK headers to include/
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-12 19:51:51 +01:00
Enrico Weigelt, metux IT consult
1cc06b8d60 xfree86: i2c: move over public SDK headers to include/
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-12 19:50:11 +01:00
Enrico Weigelt, metux IT consult
45d2ba92d3 xfree86: ddc: move public SDK headers to include/
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-12 19:18:54 +01:00
Enrico Weigelt, metux IT consult
1431b33caa xfree86: modes: move public SDK headers to include/
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-12 19:03:56 +01:00