Commit Graph

20836 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
stefan11111 160ab343ea mi: move miPointerCloseScreen to hookPostClose
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-03 18:46:58 +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
Nathan Kidd 7ca8b37ab1 glx: Don't blindly write 8 bytes in GLX single replies
Previously we leaked stack when invalid enum parameters were
specified and caused __glGet*_size functions to return a 0 size.

Further, we read out-of-bounds (and leaked) when the input data was less
than 8 bytes (__glXDispSwap_GetFramebufferAttachmentParameteriv and
__glXDisp_GetRenderbufferParameteriv).

Now we only write a single element in the reply padding, and only when there
is a single element. This is what the Mesa client-side libGL expects, and
restores original GLX server behaviour, matching both pre-public (1996) SGI GLX
and XFree86 4.

The main risk of this change is if we have any error in element count or size;
previously it may not have mattered but now it does.

There are no piglit result changes from this modification using either mesa
libGLX or NVIDIA libGLX.

For performance considerations, an extra conditional and variable-length
memcpy has no meaningful impact on the indirect rendering pipeline cost.

There is still the possiblity to leak if our size checks allow an enum that
the GL implemention does not. Guarding against that requires zero-initializing
all temp storage, which wants re-evaluation of the blind 200-byte buffers
used for many calls and thus is a much bigger change.

Signed-off-by: Nathan Kidd <nkidd@rocketsoftware.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1647>
2025-07-03 16:43:18 +02:00
Nathan Kidd 5b810bac5e glx: Fix out-of-bounds reads from negative return
The callers of these functions were casting -1 to unsigned and then
using 4GB indexes. By returning 0 we match all the other size functions.

GLX size functions return -1 to indicate error, but GL size functions return 0.

Signed-off-by: Nathan Kidd <nkidd@rocketsoftware.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1647>
2025-07-03 16:43:18 +02:00
dasha_uwu 7c64a06ba4 treewide: remove "lib" prefix in static_library names (meson)
this was producing static libraries named "liblibsomething.a"

Signed-off-by: dasha_uwu <dasha@linuxping.win>
2025-07-03 12:01:52 +02:00
Enrico Weigelt, metux IT consult 5d7be80305 minor release 25.0.0.3
minor bugfix release.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-02 17:44:12 +02:00
stefan11111 6851e17816 meson.build: meson_options.txt: add build option to disable building tests
These tests take a long time to build and link, especially with lto.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-02 17:40:10 +02:00
Enrico Weigelt, metux IT consult 96be335fd3 miext: damage: use dixScreenHookPostClose() instead of dixScreenHookClose()
Some drivers need to call into damage from within their CloseScreen proc,
so damage teardown needs to be done after that, instead of before.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-02 15:41:37 +02:00
Enrico Weigelt, metux IT consult 56650ba873 dix: add screen hook for post-close
In contrast to the already existing ScreenClose hook, this one is
called *after* the driver's CloseScreen() proc. That's required for
some extensions (eg. damage) where drivers still need to call in
inside of their CloseScreen procs.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-02 15:41:37 +02:00
Enrico Weigelt, metux IT consult 4036b8c163 os: log: vpnprintf(): ignore reverse justification modifier
The only caller is libinput, and we don't really need it, just silencing
bug message.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-01 17:15:56 +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
Enrico Weigelt, metux IT consult a4c3c9da4d xf86bigfont: fix compiler warning on unused variable
> ../Xext/xf86bigfont.c: In function ‘SProcXF86BigfontQueryVersion’:
> ../include/dix.h:65:12: warning: unused variable ‘stuff’ [-Wunused-variable]
>   65 |     type * stuff = (type *)client->requestBuffer;

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-01 17:01:07 +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
Tautvis 6c2f17a5e0 xf86vidmode: fix result copying in ProcVidModeGetMonitor()
The monitor values (vendor and model) accidentally had been copied
at the start of the payload, instead of being appended after the
previously copied data, and also moving the wrong pointer, thus
corrupting the reply and causing some clients to hang.

Signed-off-by: Tautvis <gtautvis@gmail.com>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-01 15:58:44 +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
Enrico Weigelt, metux IT consult ccf9787bd6 .github: add building mouse driver
xf86-input-mouse is now supported Linux again, so add it to the build.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 19:22:01 +02:00
Enrico Weigelt, metux IT consult d08631bef1 minor release 25.0.0.2
minor bugfix release.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 12:44:45 +02:00
Enrico Weigelt, metux IT consult d441e4783e .github: 01-bug-report: use 25.0.0.X instead of listing all minor releases
Listing all patchlevels in the ticket form would quickly explode it.

Users are expected to always run the latest patchlevel (4th digit), because
they're only receiving urgent bug and security fixes, not getting anything new,
that could break other things.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 12:38:51 +02:00
Collin 949e4e4fa0 Update build-xserver.yml to have correct permissions to resolve CodeQL alert
https://github.com/HaplessIdiot/xserver/security/code-scanning/16 Adds permissions to build in read only to support ubuntu package standards.
2025-06-30 12:25:18 +02:00
notbabaisyou 7fb4ba10f2 glamor: Enable dmabuf_capable for Zink
This lets Zink take advantage of DRM modifiers on GPUs letting it properly handle tiled buffers.

Signed-off-by: notbabaisyou <though-went-some-simple@proton.me>
2025-06-27 19:23:43 +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
Bastiaan Quast 25c002c54b CONTRIBUTION.md: "MR" / "MRs" -> pull request(s) 2025-06-27 19:22:18 +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
notbabaisyou 8f50b8cc19 Xext: Fix typo in xace.h
`modsetting` -> `modesetting`

Signed-off-by: notbabaisyou <though-went-some-simple@proton.me>
2025-06-27 17:10:33 +02:00
Mike Gelfand 9ab598e2b2 .github: add comments explaning the reasons behind xts patching
Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 17:07:42 +02:00
Mike Gelfand f40afc8983 .github: .gitlab-ci: add macos (xquartz) build job
Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 17:07:42 +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
Enrico Weigelt, metux IT consult 6a10d96761 rootless: fix missing include of dix/screen_hooks_priv.h
We're using XorgScreenWindowPositionParamRec here, so need to include
that header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-27 13:59:13 +02:00
Mike Gelfand 26f56735c5 record: add/fix include guards where missing/broken
Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 13:58:05 +02:00
Mike Gelfand c4ca14eff0 pseudoramix: add/fix include guards where missing/broken
Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 13:58:05 +02:00
Mike Gelfand 565309bb33 miext: add/fix include guards where missing/broken
Skipped headers designed for multiple or non-trivial inclusion:
* miext/shadow/shrotpack.h
* miext/shadow/shrotpackYX.h

Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 13:58:05 +02:00
Mike Gelfand 32b26ccf9e mi: add/fix include guards where missing/broken
Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 13:58:05 +02:00
Mike Gelfand f5e00916aa include: add/fix include guards where missing/broken
Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 13:58:05 +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
Mike Gelfand 166d1b5e6b fb: add/fix include guards where missing/broken
Skipped headers designed for multiple or non-trivial inclusion:
* fb/fbbits.h

Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 13:58:05 +02:00
Mike Gelfand 7fbd8db7a4 config: add/fix include guards where missing/broken
Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 13:58:05 +02:00
Mike Gelfand b5d569a884 xext: add/fix include guards where missing/broken
Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 13:58:05 +02:00
callmetango 87c8520ba3 .github: Add new issue forms
Add the following forms for issue creation:

* Bug report
* Feature request
* Code cleanup
* Documentation update
* Organizational task

* add issue type selection page on "New Issue" call
* mention Github Discussions and the mailing list where appropriate

Fixes #257

Signed-off-by: callmetango <callmetango@users.noreply.github.com>
2025-06-27 13:56:00 +02:00
Mike Gelfand 5ed2865bdd .github: don't override env vars set externally
Helpful for CI builds where we could be setting different paths on
different runners (due to OS or something else).

Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 13:45:11 +02:00
Mike Gelfand 5e98d8c571 .gitlab-ci: only look for files when validating man pages
Build directory may sometimes contain directories ending with a period
and a digit, e.g. in my case

* ./meson-private/cmake_xshmfence/CMakeFiles/4.0.3
* ./meson-private/__CMake_compiler_info__/CMakeFiles/4.0.3

Since man pages are files, filter out the rest.

Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 13:35:34 +02:00
Mike Gelfand bc8518f8f8 .github: drop sudo for prerequisites builds
Files aren't being installed into privileged directories as part of the
build but instead into $X11_PREFIX which resides in current user's home
directory.

Change the cache key to avoid reusing old cache entries, which would
lead to permission errors.

Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 13:34:40 +02:00
Mike Gelfand 705d1ce679 .github: export MACHINE the right way
Otherwise, paths constructed on "build xserver sdk" step aren't valid.

Signed-off-by: Mike Gelfand <mikedld@mikedld.com>
2025-06-27 13:13:54 +02:00