Compare commits

...

56 Commits

Author SHA1 Message Date
stefan11111 d403cbd25c kdrive: ephyr: initialize OS specific callback vectors
These will be used by subsequent commits for generic Kdrive
functions calling back into the OS specific parts

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-04 19:36:04 +02:00
stefan11111 a46fd9f16e kdrive: add KdOsInit
Kdrive X servers used to do the OS-speciffic init part using KdOsInit.
This was changed in modern Xorg because Xephyr is the only kdrive
X server there, so there was no need to keep this generic.
Since we want to eventually add Xfbdev, we need to add this back.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-04 19:36:04 +02:00
Enrico Weigelt, metux IT consult fc9bd6b175 minor release 25.0.0.4
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:26:48 +02:00
Enrico Weigelt, metux IT consult d338bf6e68 namespace: drop unused winIsRoot()
Not used in this file, so no need to keep it around anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:11:54 +02:00
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
Icenowy Zheng 3e1c2d5456 glamor: Fix dual blend on GLES3
The EXT_blend_func_extended extension on ESSL always requires explicit
request to allow two FS out variables because of limitations of the ESSL
language, which is mentioned as the No.6 issue of the extension's
specification.

Fix this by adding the extension request.

The original behavior on GLES3 is slightly against the specification of
GL_EXT_blend_func_extended extension, however Mesa and older version of
PowerVR closed drivers will just ignore this issue. Newest PowerVR
closed driver will bail out on this problem, so it deems a fix now.

Fixes: ee107cd491 ("glamor: support GLES3 shaders")
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1750>
2025-06-26 15:30:56 +02:00
b-aaz 3079488484 dix: generate-atoms: Changed BASH to POSIX SH for portability.
BASH is not preinstalled on many systems.
Also added -r and IFS= to the read command.

Signed-off-by; b-aaz <b-aazbsd.proton.me>
2025-06-25 10:53:36 +02:00
109 changed files with 821 additions and 174 deletions

View File

@ -0,0 +1,65 @@
name: 🐞 Bug report
description: Create a report to help us improve
labels: [bug, needs-triage]
#type: bug
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to help everyone identify and fix the bug. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: dropdown
id: affected-version
attributes:
label: Select the version
options:
- 25.0.0.X
- Git master branch
- other or don't know
default: 1
validations:
required: true
- type: textarea
id: description
attributes:
label: Describe your issue
placeholder: When I did X then Y happened.
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
placeholder: |
1. Start ...
2. Do this
3. Do that
validations:
required: true
- type: textarea
id: expected
attributes:
label: What did you expect?
placeholder: I expected this to happen.
- type: textarea
id: environment
attributes:
label: Additional Information
description: Additional information you want to provide such as logs, system info, environment, screenshots, etc.
placeholder: |
Add any other context about the bug here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xserver/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for reporting this issue! We will get back to you as soon as possible.

View File

@ -0,0 +1,49 @@
name: ✨ Feature request
description: Suggest a feature for this software
labels: [enhancement, needs-triage]
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to properly describe the new software feature you are suggesting. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: "Describe the feature"
placeholder: A thing in X that allows to do Y.
validations:
required: true
- type: textarea
id: rationale
attributes:
label: "It should be implemented because"
placeholder: Doing Y is needed for Z.
validations:
required: true
- type: textarea
id: alternative
attributes:
label: "What are the alternatives?"
placeholder: We could do A or B instead.
- type: textarea
id: context
attributes:
label: Additional context
description: Additional information you want to provide such as references to related issues or protocols, the implications on existing use cases, etc.
placeholder: |
Add any other context about the feature request here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xserver/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for your suggestion! Let's see together if it can be implemented.

View File

@ -0,0 +1,50 @@
name: 🔧 Code cleanup
description: Level up the source code
labels: [code-cleanup, needs-triage]
#type: codecleanup
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to properly describe the code cleanup you are suggesting. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: "Describe the cleanup"
placeholder: C in X needs to be changed into D.
validations:
required: true
- type: textarea
id: rationale
attributes:
label: "It should be done because"
placeholder: Having D is needed for E.
validations:
required: true
- type: textarea
id: alternative
attributes:
label: "What are the alternatives?"
placeholder: We could do A or B instead.
- type: textarea
id: context
attributes:
label: Additional context
description: Additional information you want to provide such as implications on existing code, how to ensure API/ABI stability, which tests are needed or to be run, related issues, etc.
placeholder: |
Add any other context about the cleanup here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xserver/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for looking at the source code! Let's see together how it can be improved.

View File

@ -0,0 +1,39 @@
name: 🔖 Documentation update
description: Make your mark for better documentation
labels: [documentation, needs-triage]
#type: docchange
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to help others understand our software. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: Describe the update
placeholder: These things need to be better documented.
validations:
required: true
- type: textarea
id: environment
attributes:
label: Additional Information
description: Additional information you want to provide such as tickets related to changes in the software, affected files, screenshots, etc.
placeholder: |
Add any other context about the update here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xserver/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for requesting this update! We will get back to you as soon as possible.

44
.github/ISSUE_TEMPLATE/05-org-task.yml vendored Normal file
View File

@ -0,0 +1,44 @@
name: ✅ Organizational task
description: Create a task for project organization
labels: [needs-triage, organization]
#type: task
body:
- type: markdown
attributes:
value: |
Please fill out the sections below to get organizational things done. If you have a general idea or question then please use the [discussions](https://github.com/orgs/X11Libre/discussions).
- type: textarea
id: description
attributes:
label: Describe the task
placeholder: These things need to be done.
validations:
required: true
- type: textarea
id: rationale
attributes:
label: "It should be done because"
placeholder: Doing Y is needed for Z.
- type: textarea
id: environment
attributes:
label: Additional Information
description: Additional information you want to provide such as the context for bigger tasks, the implicatons on existing workflows, related issues, etc.
placeholder: |
Add any other context about the task here.
- type: checkboxes
id: checks
attributes:
label: Extra fields
options:
- label: I have checked the existing [issues](https://github.com/X11Libre/xserver/issues)
required: true
- label: I have read the [Contributing Guidelines](https://github.com/X11Libre/xserver/blob/master/CONTRIBUTING.md)
required: true
- label: I'd like to work on this issue
- type: markdown
attributes:
value: |
Thanks for adding this task! We will get back to you as soon as possible.

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: XLibre Community Support
url: https://github.com/orgs/X11Libre/discussions
about: Please ask and answer questions here.
- name: Mailing List
url: https://www.freelists.org/list/xlibre
about: You can join the discussions on our mailing list.

View File

@ -14,6 +14,7 @@ cd $DRV_BUILD_DIR
build_drv_ac xf86-input-elographics $X11L_DRV_GIT/xf86-input-elographics master build_drv_ac xf86-input-elographics $X11L_DRV_GIT/xf86-input-elographics master
build_drv_ac xf86-input-evdev $X11L_DRV_GIT/xf86-input-evdev master build_drv_ac xf86-input-evdev $X11L_DRV_GIT/xf86-input-evdev master
build_drv_ac xf86-input-libinput $X11L_DRV_GIT/xf86-input-libinput master build_drv_ac xf86-input-libinput $X11L_DRV_GIT/xf86-input-libinput master
build_drv_ac xf86-input-mouse $X11L_DRV_GIT/xf86-input-mouse master
build_drv_ac xf86-input-synaptics $X11L_DRV_GIT/xf86-input-synaptics master build_drv_ac xf86-input-synaptics $X11L_DRV_GIT/xf86-input-synaptics master
build_drv_ac xf86-video-amdgpu $X11L_DRV_GIT/xf86-video-amdgpu xf86-video-amdgpu-23.0.0 build_drv_ac xf86-video-amdgpu $X11L_DRV_GIT/xf86-video-amdgpu xf86-video-amdgpu-23.0.0

View File

@ -1,6 +1,13 @@
export X11_PREFIX=/home/runner/x11 export X11_OS=`uname -s`
export X11_PREFIX="${X11_PREFIX:-$HOME/x11}"
export X11_BUILD_DIR="${X11_BUILD_DIR:-$HOME/build-deps}"
export DRV_BUILD_DIR="${DRV_BUILD_DIR:-$HOME/build-drivers}"
case "$X11_OS" in
Darwin) export FDO_CI_CONCURRENT=`sysctl -n hw.logicalcpu` ;;
Linux) export FDO_CI_CONCURRENT=`nproc` ;;
esac
export PATH="$X11_PREFIX/bin:$PATH" export PATH="$X11_PREFIX/bin:$PATH"
export PKG_CONFIG_PATH="$X11_PREFIX/lib/x86_64-linux-gnu/pkgconfig:$X11_PREFIX/lib/pkgconfig:$X11_PREFIX/share/pkgconfig:$PKG_CONFIG_PATH" export PKG_CONFIG_PATH="$X11_PREFIX/lib/x86_64-linux-gnu/pkgconfig:$X11_PREFIX/lib/pkgconfig:$X11_PREFIX/share/pkgconfig:$PKG_CONFIG_PATH"
export FDO_CI_CONCURRENT=`nproc`
export X11_BUILD_DIR=/home/runner/build-deps
export DRV_BUILD_DIR=/home/runner/build-drivers

View File

@ -8,10 +8,13 @@ mkdir -p $X11_BUILD_DIR
cd $X11_BUILD_DIR cd $X11_BUILD_DIR
build_meson rendercheck https://gitlab.freedesktop.org/xorg/test/rendercheck rendercheck-1.6 build_meson rendercheck https://gitlab.freedesktop.org/xorg/test/rendercheck rendercheck-1.6
if [ "$X11_OS" = "Linux" ]; then
build_meson drm https://gitlab.freedesktop.org/mesa/drm libdrm-2.4.121 \ build_meson drm https://gitlab.freedesktop.org/mesa/drm libdrm-2.4.121 \
-Domap=enabled -Domap=enabled
fi
build_meson libxcvt https://gitlab.freedesktop.org/xorg/lib/libxcvt libxcvt-0.1.0 build_meson libxcvt https://gitlab.freedesktop.org/xorg/lib/libxcvt libxcvt-0.1.0
build_ac xorgproto https://gitlab.freedesktop.org/xorg/proto/xorgproto xorgproto-2024.1 build_ac xorgproto https://gitlab.freedesktop.org/xorg/proto/xorgproto xorgproto-2024.1
if [ "$X11_OS" = "Linux" ]; then
build_meson wayland https://gitlab.freedesktop.org/wayland/wayland 1.21.0 \ build_meson wayland https://gitlab.freedesktop.org/wayland/wayland 1.21.0 \
-Dtests=false -Ddocumentation=false -Ddtd_validation=false -Dtests=false -Ddocumentation=false -Ddtd_validation=false
build_meson wayland-protocols https://gitlab.freedesktop.org/wayland/wayland-protocols 1.38 build_meson wayland-protocols https://gitlab.freedesktop.org/wayland/wayland-protocols 1.38
@ -19,6 +22,10 @@ build_meson libdecor https://gitlab.freedesktop.org/libdecor/libdecor
-D{demo,install_demo}=false -D{demo,install_demo}=false
build_meson libei https://gitlab.freedesktop.org/libinput/libei 1.0.0 \ build_meson libei https://gitlab.freedesktop.org/libinput/libei 1.0.0 \
-Dtests=disabled -Ddocumentation=[] -Dliboeffis=enabled -Dtests=disabled -Ddocumentation=[] -Dliboeffis=enabled
fi
if [ "$X11_OS" = "Darwin" ]; then
build_ac xset https://gitlab.freedesktop.org/xorg/app/xset xset-1.2.5
fi
build_ac_xts xts https://gitlab.freedesktop.org/xorg/test/xts master # dbbfa96c036e596346147081cbceda136e7c86c1 build_ac_xts xts https://gitlab.freedesktop.org/xorg/test/xts master # dbbfa96c036e596346147081cbceda136e7c86c1
clone_source piglit https://gitlab.freedesktop.org/mesa/piglit main # 265896c86f90cb72e8f218ba6a3617fca8b9a1e3 clone_source piglit https://gitlab.freedesktop.org/mesa/piglit main # 265896c86f90cb72e8f218ba6a3617fca8b9a1e3

38
.github/scripts/macos/install-pkg.sh vendored Executable file
View File

@ -0,0 +1,38 @@
#!/bin/sh
set -e
brew update
brew install \
autoconf \
automake \
bdftopcf \
libapplewm \
libtool \
libx11 \
libxau \
libxaw \
libxcb \
libxdmcp \
libxext \
libxfixes \
libxfont2 \
libxkbfile \
libxi \
libxmu \
libxrender \
libxt \
libxtst \
meson \
mkfontscale \
pkgconf \
pixman \
util-macros \
xdpyinfo \
xkbcomp \
xkeyboard-config \
xtrans
pip3 install --break-system-packages \
mako

View File

@ -82,8 +82,28 @@ build_ac_xts() {
clone_source "$pkgname" "$url" "$ref" clone_source "$pkgname" "$url" "$ref"
( (
cd $pkgname cd $pkgname
CFLAGS=-fcommon ./autogen.sh --prefix=$X11_PREFIX CFLAGS='-fcommon'
xvfb-run make -j${FDO_CI_CONCURRENT:-4} install if [ "$X11_OS" = "Darwin" ]; then
# xts5/include/XtTest.h includes <X11/Intrinsic.h> => needs xt
# xts5/src/libXtaw/*.c include <X11/Xaw/*.h> and <X11/Xmu/*.h> => need xmu and xaw7
sed -E -i~ 's|(\[XTS\], \[)|\1xt xmu xaw7 |' configure.ac
# xts5/Xlib14/X{mb,wc}TextListToTextProperty.m define a function accepting `XTextProperty` but call it passing
#`XTextProperty*`; since the parameter is seemingly meant for output, accept it as pointer
sed -E -i~ -e 's|(XTextProperty)[[:space:]]+(text_prop_good)|\1 *\2|' -e 's|(style_good),[[:space:]]*&(text_prop_good)|\1,\2|' -e 's|text_prop_good\.|text_prop_good->|' xts5/Xlib14/X{mb,wc}TextListToTextProperty.m
# xts5/Xlib*/*.m forward-declare `strcpy()` which is incompatible with _FORTIFY_SOURCE > 0 where `strcpy` is
# a macro; set _FORTIFY_SOURCE to 0 as we don't care much about security in this test code
CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0"
# declarations for `XtAppSetError{,Msg}Handler()` in <X11/Intrinsic.h> (libXt) make it hard to write warning-
# free code: they want a noreturn-annotated handler as input but return old handler without noreturn annotation,
# so e.g. `XtAppSetErrorHandler(XtAppSetErrorHandler(NULL))` (similar to xts5/Xt13/XtAppSetError*Handler.m)
# doesn't compile complaining about incompatible function pointers, at least with Apple Clang 16 (not sure why
# it treats this warning as error by default though)
if cc -Werror=unknown-warning-option -Wincompatible-function-pointer-types -c -xc -o /dev/null /dev/null 2>/dev/null; then
CFLAGS="$CFLAGS -Wno-error=incompatible-function-pointer-types"
fi
fi
./autogen.sh --prefix=$X11_PREFIX CFLAGS="$CFLAGS"
make -j${FDO_CI_CONCURRENT:-4} install
) )
touch $X11_PREFIX/$pkgname.DONE touch $X11_PREFIX/$pkgname.DONE
fi fi

View File

@ -1,5 +1,8 @@
name: Build X servers name: Build X servers
permissions:
contents: read
env: env:
MESON_BUILDDIR: "build" MESON_BUILDDIR: "build"
X11_PREFIX: /home/runner/x11 X11_PREFIX: /home/runner/x11
@ -20,7 +23,8 @@ jobs:
- name: prepare build environment - name: prepare build environment
run: | run: |
export MACHINE=`gcc -dumpmachine` MACHINE=`gcc -dumpmachine`
echo "MACHINE=$MACHINE" >> "$GITHUB_ENV"
echo "PKG_CONFIG_PATH=$X11_PREFIX/share/pkgconfig:$X11_PREFIX/lib/$MACHINE/pkgconfig:$X11_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" >> "$GITHUB_ENV" echo "PKG_CONFIG_PATH=$X11_PREFIX/share/pkgconfig:$X11_PREFIX/lib/$MACHINE/pkgconfig:$X11_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" >> "$GITHUB_ENV"
sudo chown root /bin/tar && sudo chmod u+s /bin/tar sudo chown root /bin/tar && sudo chmod u+s /bin/tar
@ -41,11 +45,11 @@ jobs:
${{ env.X11_PREFIX }} ${{ env.X11_PREFIX }}
${{ env.X11_BUILD_DIR }}/xts ${{ env.X11_BUILD_DIR }}/xts
${{ env.X11_BUILD_DIR }}/piglit ${{ env.X11_BUILD_DIR }}/piglit
key: ${{ runner.os }}-x11-deps-${{ hashFiles('.github/scripts/install-prereq.sh') }} key: ${{ runner.name }}-x11-deps-${{ hashFiles('.github/scripts/install-prereq.sh') }}
restore-keys: ${{ runner.os }}-x11-deps- restore-keys: ${{ runner.name }}-x11-deps-
- name: generic prereq - name: generic prereq
run: sudo .github/scripts/install-prereq.sh run: .github/scripts/install-prereq.sh
- name: build - name: build
run: .gitlab-ci/meson-build.sh run: .gitlab-ci/meson-build.sh
@ -78,7 +82,8 @@ jobs:
- name: prepare build environment - name: prepare build environment
run: | run: |
export MACHINE=`gcc -dumpmachine` MACHINE=`gcc -dumpmachine`
echo "MACHINE=$MACHINE" >> "$GITHUB_ENV"
echo "PKG_CONFIG_PATH=$X11_PREFIX/share/pkgconfig:$X11_PREFIX/lib/$MACHINE/pkgconfig:$X11_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" >> "$GITHUB_ENV" echo "PKG_CONFIG_PATH=$X11_PREFIX/share/pkgconfig:$X11_PREFIX/lib/$MACHINE/pkgconfig:$X11_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" >> "$GITHUB_ENV"
sudo chown root /bin/tar && sudo chmod u+s /bin/tar sudo chown root /bin/tar && sudo chmod u+s /bin/tar
@ -99,11 +104,11 @@ jobs:
${{ env.X11_PREFIX }} ${{ env.X11_PREFIX }}
${{ env.X11_BUILD_DIR }}/xts ${{ env.X11_BUILD_DIR }}/xts
${{ env.X11_BUILD_DIR }}/piglit ${{ env.X11_BUILD_DIR }}/piglit
key: ${{ runner.os }}-x11-deps-${{ hashFiles('.github/scripts/install-prereq.sh') }} key: ${{ runner.name }}-x11-deps-${{ hashFiles('.github/scripts/install-prereq.sh') }}
restore-keys: ${{ runner.os }}-x11-deps- restore-keys: ${{ runner.name }}-x11-deps-
- name: generic prereq - name: generic prereq
run: sudo .github/scripts/install-prereq.sh run: .github/scripts/install-prereq.sh
- name: build xserver sdk - name: build xserver sdk
run: | run: |
@ -117,3 +122,61 @@ jobs:
- name: compile drivers - name: compile drivers
run: .github/scripts/compile-drivers.sh run: .github/scripts/compile-drivers.sh
xserver-build-macos:
env:
MESON_ARGS: -Dprefix=/tmp -Dglx=false -Dxnest=false
X11_PREFIX: /Users/runner/x11
X11_BUILD_DIR: /Users/runner/build-deps
runs-on: macos-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: prepare build environment
run: |
echo "PKG_CONFIG_PATH=$X11_PREFIX/share/pkgconfig:$X11_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" >> "$GITHUB_ENV"
- name: homebrew cache
uses: actions/cache@v4
with:
path: /Users/runner/Library/Caches/Homebrew
key: ${{ runner.os }}-homebrew-cache-${{ hashFiles('.github/scripts/macos/install-pkg.sh') }}
restore-keys: ${{ runner.os }}-homebrew-cache-
- name: pkg install
run: .github/scripts/macos/install-pkg.sh
- name: X11 prereq cache
uses: actions/cache@v4
with:
path: |
${{ env.X11_PREFIX }}
${{ env.X11_BUILD_DIR }}/xts
${{ env.X11_BUILD_DIR }}/piglit
key: ${{ runner.os }}-x11-deps-${{ hashFiles('.github/scripts/install-prereq.sh') }}
restore-keys: ${{ runner.os }}-x11-deps-
- name: generic prereq
run: .github/scripts/install-prereq.sh
- name: build
run: .gitlab-ci/meson-build.sh
- name: tests (may fail)
continue-on-error: true
run: meson test -C "${{ env.MESON_BUILDDIR }}" --print-errorlogs -j1 || true
env:
XTEST_DIR: ${{ env.X11_BUILD_DIR }}/xts
PIGLIT_DIR: ${{ env.X11_BUILD_DIR }}/piglit
- name: archive build logs
uses: actions/upload-artifact@v4
with:
name: build-logs-macos
path: |
build/meson-logs/*
- name: ddx build check
run: .gitlab-ci/check-ddx-build.sh
- name: manpage check
run: .gitlab-ci/manpages-check

View File

@ -19,6 +19,7 @@ fi
[[ "$BUILD_XEPHYR" == true ]] && check_executable "hw/kdrive/ephyr/Xephyr" [[ "$BUILD_XEPHYR" == true ]] && check_executable "hw/kdrive/ephyr/Xephyr"
[[ "$BUILD_XNEST" == true ]] && check_executable "hw/xnest/Xnest" [[ "$BUILD_XNEST" == true ]] && check_executable "hw/xnest/Xnest"
[[ "$BUILD_XORG" == true ]] && check_executable "hw/xfree86/Xorg" [[ "$BUILD_XORG" == true ]] && check_executable "hw/xfree86/Xorg"
[[ "$BUILD_XQUARTZ" == true ]] && check_executable "hw/xquartz/mach-startup/Xquartz"
[[ "$BUILD_XVFB" == true ]] && check_executable "hw/vfb/Xvfb" [[ "$BUILD_XVFB" == true ]] && check_executable "hw/vfb/Xvfb"
exit 0 exit 0

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
find build/ -regex ".*\.[1-9]$" -exec grep -E \ find build/ -type f -regex ".*\.[1-9]$" -exec grep -E \
@vendorversion@\|\ @vendorversion@\|\
@xorgversion@\|\ @xorgversion@\|\
@xservername@\|\ @xservername@\|\

View File

@ -10,9 +10,9 @@
Keep in mind that history is also a piece of documentation. Keep in mind that history is also a piece of documentation.
3. Once release is out, bugfixes should be submitted separately, against 3. Once release is out, bugfixes should be submitted separately, against
the affected release branch(es) as well as master (so multiple MRs) the affected release branch(es) as well as master (so multiple pull requests)
4. If new functions or types are introduced, these should be documented 4. If new functions or types are introduced, these should be documented
in-code, so we can generate docs directly from the code :) in-code, so we can generate docs directly from the code :)
5. Use MR tags if you can - if we need some more, just ask. 5. Use pull request tags if you can - if we need some more, just ask.

View File

@ -2,7 +2,9 @@
* *
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net> * Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
*/ */
#ifndef _XORG_GEEXT_PRIV_H #ifndef _XORG_GEEXT_PRIV_H
#define _XORG_GEEXT_PRIV_H
#include <X11/Xproto.h> #include <X11/Xproto.h>

View File

@ -58,13 +58,13 @@ if build_xv
hdrs_xext += ['xvdix.h', 'xvmcext.h'] hdrs_xext += ['xvdix.h', 'xvmcext.h']
endif endif
libxserver_xext = static_library('libxserver_xext', libxserver_xext = static_library('xserver_xext',
srcs_xext, srcs_xext,
include_directories: inc, include_directories: inc,
dependencies: common_dep, dependencies: common_dep,
) )
libxserver_xext_vidmode = static_library('libxserver_xext_vidmode', libxserver_xext_vidmode = static_library('xserver_xext_vidmode',
'vidmode.c', 'vidmode.c',
include_directories: inc, include_directories: inc,
dependencies: common_dep, dependencies: common_dep,

View File

@ -11,14 +11,6 @@
#include "namespace.h" #include "namespace.h"
#include "hooks.h" #include "hooks.h"
static inline Bool winIsRoot(WindowPtr pWin) {
if (!pWin)
return FALSE;
if (pWin->drawable.pScreen->root == pWin)
return TRUE;
return FALSE;
}
void hookWindowProperty(CallbackListPtr *pcbl, void *unused, void *calldata) void hookWindowProperty(CallbackListPtr *pcbl, void *unused, void *calldata)
{ {
XNS_HOOK_HEAD(PropertyFilterParam); XNS_HOOK_HEAD(PropertyFilterParam);

View File

@ -1,5 +1,5 @@
libxserver_namespace = static_library( libxserver_namespace = static_library(
'libxserver_namespace', 'xserver_namespace',
[ [
'config.c', 'config.c',
'hook-client.c', 'hook-client.c',

View File

@ -1,8 +1,10 @@
/* /*
* Server dispatcher function replacements * Server dispatcher function replacements
*/ */
#ifndef XSERVER_PANORAMIXH_H
#define XSERVER_PANORAMIXH_H
extern int PanoramiXCreateWindow(ClientPtr client); extern int PanoramiXCreateWindow(ClientPtr client);
extern int PanoramiXChangeWindowAttributes(ClientPtr client); extern int PanoramiXChangeWindowAttributes(ClientPtr client);
extern int PanoramiXDestroyWindow(ClientPtr client); extern int PanoramiXDestroyWindow(ClientPtr client);
@ -71,3 +73,5 @@ extern int connBlockScreenStart;
extern xConnSetupPrefix connSetupPrefix; extern xConnSetupPrefix connSetupPrefix;
extern int (*SavedProcVector[256]) (ClientPtr client); extern int (*SavedProcVector[256]) (ClientPtr client);
#endif /* XSERVER_PANORAMIXH_H */

View File

@ -1280,7 +1280,7 @@ ProcVidModeGetMonitor(ClientPtr client)
+ nHsync + nVrefresh + nVendorItems + nModelItems + nHsync + nVrefresh + nVendorItems + nModelItems
}; };
const int buflen = nHsync * nVrefresh + nVendorItems + nModelItems; const int buflen = nHsync + nVrefresh + nVendorItems + nModelItems;
CARD32 *sendbuf = calloc(buflen, sizeof(CARD32)); CARD32 *sendbuf = calloc(buflen, sizeof(CARD32));
if (!sendbuf) if (!sendbuf)
@ -1302,22 +1302,22 @@ ProcVidModeGetMonitor(ClientPtr client)
bufwalk++; bufwalk++;
} }
memcpy(sendbuf, memcpy(bufwalk,
pVidMode->GetMonitorValue(pScreen, VIDMODE_MON_VENDOR, 0).ptr, pVidMode->GetMonitorValue(pScreen, VIDMODE_MON_VENDOR, 0).ptr,
vendorLength); vendorLength);
sendbuf += nVendorItems; bufwalk += nVendorItems;
memcpy(sendbuf, memcpy(bufwalk,
pVidMode->GetMonitorValue(pScreen, VIDMODE_MON_MODEL, 0).ptr, pVidMode->GetMonitorValue(pScreen, VIDMODE_MON_MODEL, 0).ptr,
modelLength); modelLength);
sendbuf += nModelItems; bufwalk += nModelItems;
if (client->swapped) { if (client->swapped) {
swaps(&rep.sequenceNumber); swaps(&rep.sequenceNumber);
swapl(&rep.length); swapl(&rep.length);
} }
WriteToClient(client, SIZEOF(xXF86VidModeGetMonitorReply), &rep); WriteToClient(client, sizeof(xXF86VidModeGetMonitorReply), &rep);
WriteToClient(client, buflen * sizeof(CARD32), sendbuf); WriteToClient(client, buflen * sizeof(CARD32), sendbuf);
free(sendbuf); free(sendbuf);

View File

@ -78,7 +78,7 @@ int XaceHookPropertyAccess(ClientPtr ptr, WindowPtr pWin, PropertyPtr *ppProp,
Mask access_mode); Mask access_mode);
int XaceHookSelectionAccess(ClientPtr ptr, Selection ** ppSel, Mask access_mode); int XaceHookSelectionAccess(ClientPtr ptr, Selection ** ppSel, Mask access_mode);
/* needs to be exported for in-tree modsetting, but not part of public API */ /* needs to be exported for in-tree modesetting, but not part of public API */
_X_EXPORT int XaceHookResourceAccess(ClientPtr client, XID id, RESTYPE rtype, void *res, _X_EXPORT int XaceHookResourceAccess(ClientPtr client, XID id, RESTYPE rtype, void *res,
RESTYPE ptype, void *parent, Mask access_mode); RESTYPE ptype, void *parent, Mask access_mode);

View File

@ -647,7 +647,6 @@ ProcXF86BigfontDispatch(ClientPtr client)
static int _X_COLD static int _X_COLD
SProcXF86BigfontQueryVersion(ClientPtr client) SProcXF86BigfontQueryVersion(ClientPtr client)
{ {
REQUEST(xXF86BigfontQueryVersionReq);
return ProcXF86BigfontQueryVersion(client); return ProcXF86BigfontQueryVersion(client);
} }

View File

@ -1,2 +1,7 @@
#ifndef XSERVER_XVDISP_H
#define XSERVER_XVDISP_H
extern void XineramifyXv(void); extern void XineramifyXv(void);
extern int xvUseXinerama; extern int xvUseXinerama;
#endif /* XSERVER_XVDISP_H */

View File

@ -2,7 +2,9 @@
* *
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net> * Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
*/ */
#ifndef _XORG_XVDIX_PRIV_H #ifndef _XORG_XVDIX_PRIV_H
#define _XORG_XVDIX_PRIV_H
#include <X11/Xdefs.h> #include <X11/Xdefs.h>

View File

@ -53,14 +53,14 @@ srcs_xi = [
'xiwarppointer.c', 'xiwarppointer.c',
] ]
libxserver_xi = static_library('libxserver_xi', libxserver_xi = static_library('xserver_xi',
srcs_xi, srcs_xi,
include_directories: inc, include_directories: inc,
dependencies: common_dep, dependencies: common_dep,
) )
srcs_xi_stubs = ['stubs.c'] srcs_xi_stubs = ['stubs.c']
libxserver_xi_stubs = static_library('libxserver_xi_stubs', libxserver_xi_stubs = static_library('xserver_xi_stubs',
srcs_xi_stubs, srcs_xi_stubs,
include_directories: inc, include_directories: inc,
dependencies: common_dep, dependencies: common_dep,

View File

@ -10,7 +10,7 @@ hdrs_composite = [
'compositeext.h', 'compositeext.h',
] ]
libxserver_composite = static_library('libxserver_composite', libxserver_composite = static_library('xserver_composite',
srcs_composite, srcs_composite,
include_directories: inc, include_directories: inc,
dependencies: common_dep, dependencies: common_dep,

View File

@ -23,6 +23,9 @@
* Author: Daniel Stone <daniel@fooishbar.org> * Author: Daniel Stone <daniel@fooishbar.org>
*/ */
#ifndef XSERVER_CONFIG_BACKENDS_H
#define XSERVER_CONFIG_BACKENDS_H
#ifdef HAVE_DIX_CONFIG_H #ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h> #include <dix-config.h>
#endif #endif
@ -44,3 +47,5 @@ void config_hal_fini(void);
int config_wscons_init(void); int config_wscons_init(void);
void config_wscons_fini(void); void config_wscons_fini(void);
#endif #endif
#endif /* XSERVER_CONFIG_BACKENDS_H */

View File

@ -28,7 +28,7 @@ if build_xorg
install_dir: join_paths(get_option('datadir'), 'X11/xorg.conf.d')) install_dir: join_paths(get_option('datadir'), 'X11/xorg.conf.d'))
endif endif
libxserver_config = static_library('libxserver_config', libxserver_config = static_library('xserver_config',
srcs_config, srcs_config,
include_directories: inc, include_directories: inc,
dependencies: config_dep, dependencies: config_dep,

View File

@ -2,7 +2,7 @@ srcs_damageext = [
'damageext.c', 'damageext.c',
] ]
libxserver_damageext = static_library('libxserver_damageext', libxserver_damageext = static_library('xserver_damageext',
srcs_damageext, srcs_damageext,
include_directories: inc, include_directories: inc,
dependencies: common_dep, dependencies: common_dep,

View File

@ -3,7 +3,7 @@ srcs_dbe = [
'midbe.c', 'midbe.c',
] ]
libxserver_dbe = static_library('libxserver_dbe', libxserver_dbe = static_library('xserver_dbe',
srcs_dbe, srcs_dbe,
include_directories: inc, include_directories: inc,
dependencies: common_dep, dependencies: common_dep,

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash #!/bin/sh
# SPDX-License-Identifier: MIT OR X11 # SPDX-License-Identifier: MIT OR X11
# #
# Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net> # Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
@ -7,10 +7,10 @@ INPUT="$1"
OUTPUT="$2" OUTPUT="$2"
do_line() { do_line() {
local name="$1" name="$1"
[ "$2" != "@" ] && return 0 [ "$2" != "@" ] && return 0
echo " if (MakeAtom(\"$name\", ${#name}, 1) != XA_$name)" echo " if (MakeAtom(\"$name\", ${#name}, 1) != XA_$name)"
echo " FatalError(\"adding builtin atom\");" echo " FatalError(\"Adding builtin atom\");"
} }
cat > "$OUTPUT" << __END__ cat > "$OUTPUT" << __END__
@ -35,6 +35,6 @@ MakePredeclaredAtoms(void)
{ {
__END__ __END__
( grep '@' < "$INPUT" ) | ( while read l ; do do_line $l ; done ) >> "$OUTPUT" ( grep '@' < "$INPUT" ) | ( while IFS= read -r l ; do do_line $l ; done ) >> "$OUTPUT"
echo "}" >> "$OUTPUT" echo "}" >> "$OUTPUT"

View File

@ -57,13 +57,13 @@ endif
dtrace_dep = declare_dependency(sources: [dtrace_src, dtrace_hdr]) dtrace_dep = declare_dependency(sources: [dtrace_src, dtrace_hdr])
libxserver_dix = static_library('libxserver_dix', libxserver_dix = static_library('xserver_dix',
[ srcs_dix, builtinatoms_src ], [ srcs_dix, builtinatoms_src ],
include_directories: inc, include_directories: inc,
dependencies: [ dtrace_dep, common_dep, ] dependencies: [ dtrace_dep, common_dep, ]
) )
libxserver_main = static_library('libxserver_main', libxserver_main = static_library('xserver_main',
'stubmain.c', 'stubmain.c',
include_directories: inc, include_directories: inc,
dependencies: common_dep, dependencies: common_dep,

View File

@ -23,6 +23,7 @@ void dixFreeScreen(ScreenPtr pScreen)
DeleteCallbackList(&pScreen->hookWindowDestroy); DeleteCallbackList(&pScreen->hookWindowDestroy);
DeleteCallbackList(&pScreen->hookWindowPosition); DeleteCallbackList(&pScreen->hookWindowPosition);
DeleteCallbackList(&pScreen->hookClose); DeleteCallbackList(&pScreen->hookClose);
DeleteCallbackList(&pScreen->hookPostClose);
DeleteCallbackList(&pScreen->hookPixmapDestroy); DeleteCallbackList(&pScreen->hookPixmapDestroy);
free(pScreen); free(pScreen);
} }

View File

@ -28,6 +28,7 @@
DECLARE_HOOK_PROC(WindowDestroy, hookWindowDestroy, XorgScreenWindowDestroyProcPtr); DECLARE_HOOK_PROC(WindowDestroy, hookWindowDestroy, XorgScreenWindowDestroyProcPtr);
DECLARE_HOOK_PROC(WindowPosition, hookWindowPosition, XorgScreenWindowPositionProcPtr); DECLARE_HOOK_PROC(WindowPosition, hookWindowPosition, XorgScreenWindowPositionProcPtr);
DECLARE_HOOK_PROC(Close, hookClose, XorgScreenCloseProcPtr); DECLARE_HOOK_PROC(Close, hookClose, XorgScreenCloseProcPtr);
DECLARE_HOOK_PROC(PostClose, hookPostClose, XorgScreenCloseProcPtr);
DECLARE_HOOK_PROC(PixmapDestroy, hookPixmapDestroy, XorgScreenPixmapDestroyProcPtr); DECLARE_HOOK_PROC(PixmapDestroy, hookPixmapDestroy, XorgScreenPixmapDestroyProcPtr);
DECLARE_HOOK_PROC(PostCreateResources, hookPostCreateResources, DECLARE_HOOK_PROC(PostCreateResources, hookPostCreateResources,
XorgScreenPostCreateResourcesProcPtr); XorgScreenPostCreateResourcesProcPtr);
@ -71,6 +72,8 @@ void dixScreenRaiseClose(ScreenPtr pScreen) {
if (pScreen->CloseScreen) if (pScreen->CloseScreen)
pScreen->CloseScreen(pScreen); pScreen->CloseScreen(pScreen);
CallCallbacks(&pScreen->hookPostClose, NULL);
} }
void dixScreenRaisePixmapDestroy(PixmapPtr pPixmap) void dixScreenRaisePixmapDestroy(PixmapPtr pPixmap)

View File

@ -147,6 +147,37 @@ _X_EXPORT
void dixScreenUnhookClose(ScreenPtr pScreen, void dixScreenUnhookClose(ScreenPtr pScreen,
XorgScreenCloseProcPtr func); XorgScreenCloseProcPtr func);
/**
* @brief register a screen post close notify hook on the given screen
*
* @param pScreen pointer to the screen to register the notify hook into
* @param func pointer to the hook function
*
* In contrast to Close hook, it's called *after* the driver's CloseScreen()
* proc had been called.
*
* When registration fails, the server aborts.
**/
void dixScreenHookPostClose(ScreenPtr pScreen,
XorgScreenCloseProcPtr func);
/**
* @brief unregister a screen close notify hook on the given screen
*
* @param pScreen pointer to the screen to unregister the hook from
* @param func pointer to the hook function
* @param arg opaque pointer passed to the destructor
*
* @see dixScreenHookPostClose
*
* Unregister a screen close notify hook registered via @ref dixScreenHookPostClose
*
* In contrast to Close hook, it's called *after* the driver's CloseScreen()
* proc had been called.
**/
void dixScreenUnhookPostClose(ScreenPtr pScreen,
XorgScreenCloseProcPtr func);
/* prototype of pixmap destroy notification handler */ /* prototype of pixmap destroy notification handler */
typedef void (*XorgScreenPixmapDestroyProcPtr)(CallbackListPtr *pcbl, typedef void (*XorgScreenPixmapDestroyProcPtr)(CallbackListPtr *pcbl,
ScreenPtr pScreen, ScreenPtr pScreen,

View File

@ -10,7 +10,7 @@ hdrs_dri3 = [
libxserver_dri3 = [] libxserver_dri3 = []
if build_dri3 if build_dri3
libxserver_dri3 = static_library('libxserver_dri3', libxserver_dri3 = static_library('xserver_dri3',
srcs_dri3, srcs_dri3,
include_directories: inc, include_directories: inc,
dependencies: [ common_dep, libdrm_dep ], dependencies: [ common_dep, libdrm_dep ],

View File

@ -12,7 +12,7 @@ srcs_exa = [
'exa_unaccel.c', 'exa_unaccel.c',
] ]
libxserver_exa = static_library('libxserver_exa', libxserver_exa = static_library('xserver_exa',
srcs_exa, srcs_exa,
include_directories: inc, include_directories: inc,
dependencies: common_dep, dependencies: common_dep,

View File

@ -37,7 +37,7 @@ hdrs_fb = [
'wfbrename.h' 'wfbrename.h'
] ]
libxserver_fb = static_library('libxserver_fb', libxserver_fb = static_library('xserver_fb',
srcs_fb, srcs_fb,
include_directories: inc, include_directories: inc,
dependencies: common_dep, dependencies: common_dep,
@ -46,7 +46,7 @@ libxserver_fb = static_library('libxserver_fb',
wfb_args = '-DFB_ACCESS_WRAPPER' wfb_args = '-DFB_ACCESS_WRAPPER'
libxserver_wfb = static_library('libxserver_wfb', libxserver_wfb = static_library('xserver_wfb',
srcs_fb, srcs_fb,
c_args: wfb_args, c_args: wfb_args,
include_directories: inc, include_directories: inc,

View File

@ -1,3 +1,6 @@
#ifndef XSERVER_WFBRENAME_H
#define XSERVER_WFBRENAME_H
#define fbAddTraps wfbAddTraps #define fbAddTraps wfbAddTraps
#define fbAddTriangles wfbAddTriangles #define fbAddTriangles wfbAddTriangles
#define fbAllocatePrivates wfbAllocatePrivates #define fbAllocatePrivates wfbAllocatePrivates
@ -118,3 +121,5 @@
#define fbWinPrivateKeyRec wfbWinPrivateKeyRec #define fbWinPrivateKeyRec wfbWinPrivateKeyRec
#define free_pixman_pict wfb_free_pixman_pict #define free_pixman_pict wfb_free_pixman_pict
#define image_from_pict wfb_image_from_pict #define image_from_pict wfb_image_from_pict
#endif /* XSERVER_WFBRENAME_H */

View File

@ -185,6 +185,24 @@ glamor_glyph_add(struct glamor_glyph_atlas *atlas, DrawablePtr glyph_draw)
return TRUE; return TRUE;
} }
static const glamor_facet glamor_facet_composite_glyphs_es300 = {
.name = "composite_glyphs",
.version = 130,
.fs_extensions = ("#extension GL_EXT_blend_func_extended : enable\n"),
.vs_vars = ("in vec4 primitive;\n"
"in vec2 source;\n"
"out vec2 glyph_pos;\n"),
.vs_exec = (" vec2 pos = primitive.zw * vec2(gl_VertexID&1, (gl_VertexID&2)>>1);\n"
GLAMOR_POS(gl_Position, (primitive.xy + pos))
" glyph_pos = (source + pos) * ATLAS_DIM_INV;\n"),
.fs_vars = ("in vec2 glyph_pos;\n"
"out vec4 color0;\n"
"out vec4 color1;\n"),
.fs_exec = (" vec4 mask = texture(atlas, glyph_pos);\n"),
.source_name = "source",
.locations = glamor_program_location_atlas,
};
static const glamor_facet glamor_facet_composite_glyphs_130 = { static const glamor_facet glamor_facet_composite_glyphs_130 = {
.name = "composite_glyphs", .name = "composite_glyphs",
.version = 130, .version = 130,
@ -464,7 +482,9 @@ glamor_composite_glyphs(CARD8 op,
if (glamor_glsl_has_ints(glamor_priv)) if (glamor_glsl_has_ints(glamor_priv))
prog = glamor_setup_program_render(op, src, glyph_pict, dst, prog = glamor_setup_program_render(op, src, glyph_pict, dst,
glyphs_program, glyphs_program,
&glamor_facet_composite_glyphs_130, glamor_priv->is_gles ?
&glamor_facet_composite_glyphs_es300 :
&glamor_facet_composite_glyphs_130,
glamor_priv->glyph_defines); glamor_priv->glyph_defines);
else else
prog = glamor_setup_program_render(op, src, glyph_pict, dst, prog = glamor_setup_program_render(op, src, glyph_pict, dst,

View File

@ -1192,6 +1192,8 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
"dmabuf_capable"); "dmabuf_capable");
else if (strstr((const char *)renderer, "Intel")) else if (strstr((const char *)renderer, "Intel"))
glamor_egl->dmabuf_capable = TRUE; glamor_egl->dmabuf_capable = TRUE;
else if (strstr((const char *)renderer, "zink"))
glamor_egl->dmabuf_capable = TRUE;
else else
glamor_egl->dmabuf_capable = FALSE; glamor_egl->dmabuf_capable = FALSE;
} }

View File

@ -128,13 +128,10 @@ __glXSendReply(ClientPtr client, const void *data, size_t elements,
.retval = retval, .retval = retval,
}; };
/* It is faster on almost always every architecture to just copy the 8 /* Single element goes in reply padding; don't leak uninitialized data. */
* bytes, even when not necessary, than check to see of the value of if (elements == 1) {
* elements requires it. Copying the data when not needed will do no (void) memcpy(&reply.pad3, data, element_size);
* harm. }
*/
(void) memcpy(&reply.pad3, data, 8);
WriteToClient(client, sizeof(xGLXSingleReply), &reply); WriteToClient(client, sizeof(xGLXSingleReply), &reply);
if (reply_ints != 0) { if (reply_ints != 0) {
@ -176,13 +173,10 @@ __glXSendReplySwap(ClientPtr client, const void *data, size_t elements,
.retval = bswap_32(retval), .retval = bswap_32(retval),
}; };
/* It is faster on almost always every architecture to just copy the 8 /* Single element goes in reply padding; don't leak uninitialized data. */
* bytes, even when not necessary, than check to see of the value of if (elements == 1) {
* elements requires it. Copying the data when not needed will do no (void) memcpy(&reply.pad3, data, element_size);
* harm. }
*/
(void) memcpy(&reply.pad3, data, 8);
WriteToClient(client, sizeof(xGLXSingleReply), &reply); WriteToClient(client, sizeof(xGLXSingleReply), &reply);
if (reply_ints != 0) { if (reply_ints != 0) {

View File

@ -32,7 +32,7 @@ srcs_glx = [
libxserver_glx = [] libxserver_glx = []
if build_glx if build_glx
libxserver_glx = static_library('libxserver_glx', libxserver_glx = static_library('xserver_glx',
srcs_glx, srcs_glx,
include_directories: inc, include_directories: inc,
dependencies: [ dependencies: [
@ -68,7 +68,7 @@ hdrs_vnd = [
libglxvnd = [] libglxvnd = []
if build_glx if build_glx
libglxvnd = static_library('libglxvnd', libglxvnd = static_library('glxvnd',
srcs_vnd, srcs_vnd,
include_directories: inc, include_directories: inc,
dependencies: [ dependencies: [

View File

@ -105,7 +105,7 @@ __glGetMap_size(GLenum target, GLenum query)
} }
break; break;
} }
return -1; return 0;
} }
GLint GLint
@ -164,7 +164,7 @@ __glGetPixelMap_size(GLenum map)
query = GL_PIXEL_MAP_A_TO_A_SIZE; query = GL_PIXEL_MAP_A_TO_A_SIZE;
break; break;
default: default:
return -1; return 0;
} }
glGetIntegerv(query, &size); glGetIntegerv(query, &size);
return size; return size;

View File

@ -1435,12 +1435,11 @@ MouseFini(KdPointerInfo * pi)
} }
KdPointerDriver EphyrMouseDriver = { KdPointerDriver EphyrMouseDriver = {
"ephyr", .name = "ephyr",
MouseInit, .Init = MouseInit,
MouseEnable, .Enable = MouseEnable,
MouseDisable, .Disable = MouseDisable,
MouseFini, .Fini = MouseFini,
NULL,
}; };
/* Keyboard */ /* Keyboard */
@ -1509,12 +1508,11 @@ EphyrKeyboardBell(KdKeyboardInfo * ki, int volume, int frequency, int duration)
} }
KdKeyboardDriver EphyrKeyboardDriver = { KdKeyboardDriver EphyrKeyboardDriver = {
"ephyr", .name = "ephyr",
EphyrKeyboardInit, .Init = EphyrKeyboardInit,
EphyrKeyboardEnable, .Enable = EphyrKeyboardEnable,
EphyrKeyboardLeds, .Leds = EphyrKeyboardLeds,
EphyrKeyboardBell, .Bell = EphyrKeyboardBell,
EphyrKeyboardDisable, .Disable = EphyrKeyboardDisable,
EphyrKeyboardFini, .Fini = EphyrKeyboardFini,
NULL,
}; };

View File

@ -21,6 +21,9 @@
* IN THE SOFTWARE. * IN THE SOFTWARE.
*/ */
#ifndef XSERVER_KDRIVE_EPHYR_GLAMOR_H
#define XSERVER_KDRIVE_EPHYR_GLAMOR_H
#include <xcb/xcb.h> #include <xcb/xcb.h>
#include "dix-config.h" #include "dix-config.h"
@ -63,3 +66,5 @@ ephyr_glamor_damage_redisplay(struct ephyr_glamor *glamor,
} }
#endif /* !GLAMOR */ #endif /* !GLAMOR */
#endif /* XSERVER_KDRIVE_EPHYR_GLAMOR_H */

View File

@ -370,6 +370,23 @@ ddxProcessArgument(int argc, char **argv, int i)
return KdProcessArgument(argc, argv, i); return KdProcessArgument(argc, argv, i);
} }
static int
EphyrInit(void)
{
/*
* make sure at least one screen
* has been added to the system.
*/
if (!KdCardInfoLast()) {
processScreenArg("640x480", NULL);
}
return hostx_init();
}
KdOsFuncs EphyrOsFuncs = {
.Init = EphyrInit,
};
void void
OsVendorInit(void) OsVendorInit(void)
{ {
@ -381,32 +398,23 @@ OsVendorInit(void)
if (hostx_want_host_cursor()) if (hostx_want_host_cursor())
ephyrFuncs.initCursor = &ephyrCursorInit; ephyrFuncs.initCursor = &ephyrCursorInit;
if (serverGeneration == 1) { KdOsInit(&EphyrOsFuncs);
if (!KdCardInfoLast()) {
processScreenArg("640x480", NULL);
}
hostx_init();
}
} }
KdCardFuncs ephyrFuncs = { KdCardFuncs ephyrFuncs = {
ephyrCardInit, /* cardinit */ .cardinit = ephyrCardInit,
ephyrScreenInitialize, /* scrinit */ .scrinit = ephyrScreenInitialize,
ephyrInitScreen, /* initScreen */ .initScreen = ephyrInitScreen,
ephyrFinishInitScreen, /* finishInitScreen */ .finishInitScreen = ephyrFinishInitScreen,
ephyrCreateResources, /* createRes */ .createRes = ephyrCreateResources,
ephyrScreenFini, /* scrfini */
ephyrCardFini, /* cardfini */
0, /* initCursor */ .scrfini = ephyrScreenFini,
.cardfini = ephyrCardFini,
0, /* initAccel */ /* no cursor or accel funcs here */
0, /* enableAccel */
0, /* disableAccel */
0, /* finiAccel */
ephyrGetColors, /* getColors */ .getColors = ephyrGetColors,
ephyrPutColors, /* putColors */ .putColors = ephyrPutColors,
ephyrCloseScreen, /* closeScreen */ .closeScreen = ephyrCloseScreen,
}; };

View File

@ -91,6 +91,14 @@ const char *kdGlobalXkbLayout = NULL;
const char *kdGlobalXkbVariant = NULL; const char *kdGlobalXkbVariant = NULL;
const char *kdGlobalXkbOptions = NULL; const char *kdGlobalXkbOptions = NULL;
/*
* Carry arguments from InitOutput through driver initialization
* to KdScreenInit
*/
KdOsFuncs *kdOsFuncs = NULL;
void void
KdDisableScreen(ScreenPtr pScreen) KdDisableScreen(ScreenPtr pScreen)
{ {
@ -517,6 +525,19 @@ KdProcessArgument(int argc, char **argv, int i)
return 0; return 0;
} }
void
KdOsInit(KdOsFuncs * pOsFuncs)
{
kdOsFuncs = pOsFuncs;
if (pOsFuncs) {
if (serverGeneration == 1) {
KdDoSwitchCmd("start");
if (pOsFuncs->Init)
(*pOsFuncs->Init) ();
}
}
}
static Bool static Bool
KdAllocatePrivates(ScreenPtr pScreen) KdAllocatePrivates(ScreenPtr pScreen)
{ {

View File

@ -278,6 +278,16 @@ int KdAddConfigKeyboard(char *pointer);
int KdAddKeyboard(KdKeyboardInfo * ki); int KdAddKeyboard(KdKeyboardInfo * ki);
void KdRemoveKeyboard(KdKeyboardInfo * ki); void KdRemoveKeyboard(KdKeyboardInfo * ki);
typedef struct _KdOsFuncs {
int (*Init) (void); /* Only called when the X server is started, when serverGeneration == 1 */
void (*Enable) (void);
Bool (*SpecialKey) (KeySym);
void (*Disable) (void);
void (*Fini) (void);
void (*pollEvents) (void);
void (*Bell) (int, int, int);
} KdOsFuncs;
typedef struct _KdPointerMatrix { typedef struct _KdPointerMatrix {
int matrix[2][3]; int matrix[2][3];
} KdPointerMatrix; } KdPointerMatrix;
@ -289,6 +299,8 @@ extern DevPrivateKeyRec kdScreenPrivateKeyRec;
extern Bool kdEmulateMiddleButton; extern Bool kdEmulateMiddleButton;
extern Bool kdDisableZaphod; extern Bool kdDisableZaphod;
extern KdOsFuncs *kdOsFuncs;
#define KdGetScreenPriv(pScreen) ((KdPrivScreenPtr) \ #define KdGetScreenPriv(pScreen) ((KdPrivScreenPtr) \
dixLookupPrivate(&(pScreen)->devPrivates, kdScreenPrivateKey)) dixLookupPrivate(&(pScreen)->devPrivates, kdScreenPrivateKey))
#define KdSetScreenPriv(pScreen,v) \ #define KdSetScreenPriv(pScreen,v) \
@ -345,6 +357,9 @@ void
int int
KdProcessArgument(int argc, char **argv, int i); KdProcessArgument(int argc, char **argv, int i);
void
KdOsInit(KdOsFuncs * pOsFuncs);
void void
KdOsAddInputDrivers(void); KdOsAddInputDrivers(void);

View File

@ -259,13 +259,6 @@ ddxGiveUp(enum ExitCode error)
} }
} }
#ifdef __APPLE__
void
DarwinHandleGUI(int argc, char *argv[])
{
}
#endif
void void
OsVendorInit(void) OsVendorInit(void)
{ {

View File

@ -24,6 +24,9 @@
* *
*/ */
#ifndef XSERVER_XFREE86_XF86VGAARBITERPRIV_H
#define XSERVER_XFREE86_XF86VGAARBITERPRIV_H
#ifdef HAVE_XORG_CONFIG_H #ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h> #include <xorg-config.h>
#endif #endif
@ -273,3 +276,5 @@ static void VGAarbiterGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
static void VGAarbiterCompositeRects(CARD8 op, PicturePtr pDst, static void VGAarbiterCompositeRects(CARD8 op, PicturePtr pDst,
xRenderColor * color, int nRect, xRenderColor * color, int nRect,
xRectangle *rects); xRectangle *rects);
#endif /* XSERVER_XFREE86_XF86VGAARBITERPRIV_H */

View File

@ -1 +1,5 @@
special compat code for legacy drivers, namely Nvidia proprietary special compat code for legacy drivers, namely Nvidia proprietary
NVidia is lacking behind for at least a year and don't actually clean up
their spaghetti code. That's why we need to keep several special compat
functions to emulate prehistoric behaviour.

View File

@ -4,6 +4,8 @@
#include "dix/dix_priv.h" #include "dix/dix_priv.h"
#include "xf86_compat.h"
/* /*
* this is specifically for NVidia proprietary driver: they're again lagging * this is specifically for NVidia proprietary driver: they're again lagging
* behind a year, doing at least some minimal cleanup of their code base. * behind a year, doing at least some minimal cleanup of their code base.
@ -13,12 +15,7 @@ _X_EXPORT void MarkClientException(ClientPtr pClient);
void MarkClientException(ClientPtr pClient) void MarkClientException(ClientPtr pClient)
{ {
LogMessageVerb(X_WARNING, 0, "Bogus driver calling DIX-internal function MarkClientException() !\n"); xf86NVidiaBugInternalFunc("MarkClientException()");
LogMessageVerb(X_WARNING, 0, "External drivers really should never ever call this function.\n");
LogMessageVerb(X_WARNING, 0, "Nor should they ever DIX-internal fields like ClientRec->noClientException\n");
LogMessageVerb(X_WARNING, 0, "File a bug report to driver vendor or use a FOSS driver.\n");
LogMessageVerb(X_WARNING, 0, "Proprietary drivers are inherently unstable, they just can't be done right.\n");
LogMessageVerb(X_WARNING, 0, "And just don't buy Nvidia hardware, ever.\n");
dixMarkClientException(pClient); dixMarkClientException(pClient);
} }

View File

@ -4,6 +4,8 @@
#include "include/os.h" #include "include/os.h"
#include "xf86_compat.h"
#undef xf86Msg #undef xf86Msg
#undef xf86MsgVerb #undef xf86MsgVerb
@ -17,9 +19,7 @@ _X_EXPORT void xf86Msg(MessageType type, const char *format, ...)
void xf86Msg(MessageType type, const char *format, ...) void xf86Msg(MessageType type, const char *format, ...)
{ {
LogMessageVerb(X_WARNING, 0, "Outdated driver still using xf86Msg() !\n"); xf86NVidiaBugInternalFunc("xf86Msg()");
LogMessageVerb(X_WARNING, 0, "File a bug report to driver vendor or use a FOSS driver.\n");
LogMessageVerb(X_WARNING, 0, "Proprietary drivers are inherently unstable, they just can't be done right.\n");
va_list ap; va_list ap;
@ -39,9 +39,12 @@ _X_EXPORT void xf86MsgVerb(MessageType type, int verb, const char *format, ...)
void void
xf86MsgVerb(MessageType type, int verb, const char *format, ...) xf86MsgVerb(MessageType type, int verb, const char *format, ...)
{ {
LogMessageVerb(X_WARNING, 0, "Outdated driver still using xf86MsgVerb() !\n"); static char reportxf86MsgVerb = 1;
LogMessageVerb(X_WARNING, 0, "File a bug report to driver vendor or use a FOSS driver.\n");
LogMessageVerb(X_WARNING, 0, "Proprietary drivers are inherently unstable, they just can't be done right.\n"); if (reportxf86MsgVerb) {
xf86NVidiaBugInternalFunc("xf86MsgVerb()");
reportxf86MsgVerb = 0;
}
va_list ap; va_list ap;
va_start(ap, format); va_start(ap, format);

View File

@ -1,6 +1,7 @@
srcs_xorg_compat = [ srcs_xorg_compat = [
'clientexception.c', 'clientexception.c',
'log.c', 'log.c',
'nvidiabug.c',
'ones.c', 'ones.c',
'xf86Helper.c', 'xf86Helper.c',
] ]

View File

@ -0,0 +1,31 @@
/* SPDX-License-Identifier: MIT OR X11
*
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
*/
#include <dix-config.h>
#include "include/os.h"
#include "xf86_compat.h"
void xf86NVidiaBug(void)
{
LogMessageVerb(X_WARNING, 0, "[DRIVER BUG] file a bug report to driver vendor or use a free Xlibre driver.\n");
LogMessageVerb(X_WARNING, 0, "[DRIVER BUG] Proprietary drivers are inherently unstable, they just can't be done right.\n");
LogMessageVerb(X_WARNING, 0, "[DRIVER BUG] For NVidia report here: https://forums.developer.nvidia.com/c/gpu-graphics/linux/148\n");
LogMessageVerb(X_WARNING, 0, "[DRIVER BUG] And better don't buy NVidia HW until they've fixed their mess.\n");
}
void xf86NVidiaBugInternalFunc(const char* name)
{
LogMessageVerb(X_WARNING, 0, "[DRIVER BUG] calling internal function: %s\n", name);
LogMessageVerb(X_WARNING, 0, "[DRIVER BUG] this function is not supposed to be by drivers ever\n");
xf86NVidiaBug();
}
void xf86NVidiaBugObsoleteFunc(const char* name)
{
LogMessageVerb(X_WARNING, 0, "[DRIVER BUG] calling obsolete function: %s\n", name);
LogMessageVerb(X_WARNING, 0, "[DRIVER BUG] this function is not supposed to be by drivers ever\n");
xf86NVidiaBug();
}

View File

@ -0,0 +1,12 @@
/* SPDX-License-Identifier: MIT OR X11
*
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
*/
#ifndef __XFREE86_COMPAT_XF86_COMPAT_H
#define __XFREE86_COMPAT_XF86_COMPAT_H
void xf86NVidiaBug(void);
void xf86NVidiaBugInternalFunc(const char* name);
void xf86NVidiaBugObsoleteFunc(const char* name);
#endif /* __XFREE86_COMPAT_XF86_COMPAT_H */

View File

@ -23,4 +23,9 @@
* Author: Daniel Stone <daniel@fooishbar.org> * Author: Daniel Stone <daniel@fooishbar.org>
*/ */
#ifndef XSERVER_XFREE86_DRI2INT_H
#define XSERVER_XFREE86_DRI2INT_H
extern Bool DRI2ModuleSetup(void); extern Bool DRI2ModuleSetup(void);
#endif /* XSERVER_XFREE86_DRI2INT_H */

View File

@ -1306,7 +1306,7 @@ PreInit(ScrnInfoPtr pScrn, int flags)
ms->atomic_modeset_capable = (ret == 0); ms->atomic_modeset_capable = (ret == 0);
if (xf86ReturnOptValBool(ms->drmmode.Options, OPTION_ATOMIC, FALSE)) { if (xf86ReturnOptValBool(ms->drmmode.Options, OPTION_ATOMIC, FALSE)) {
ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 1); ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 2);
ms->atomic_modeset = (ret == 0); ms->atomic_modeset = (ret == 0);
if (!ms->atomic_modeset) if (!ms->atomic_modeset)
xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Atomic modesetting not supported\n"); xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Atomic modesetting not supported\n");
@ -1631,7 +1631,7 @@ msStopFlippingPixmapTracking(DrawablePtr src,
} }
static Bool static Bool
modsetCreateScreenResources(ScreenPtr pScreen) modesetCreateScreenResources(ScreenPtr pScreen)
{ {
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
modesettingPtr ms = modesettingPTR(pScrn); modesettingPtr ms = modesettingPTR(pScrn);
@ -1941,7 +1941,7 @@ ScreenInit(ScreenPtr pScreen, int argc, char **argv)
return FALSE; return FALSE;
} }
pScreen->CreateScreenResources = modsetCreateScreenResources; pScreen->CreateScreenResources = modesetCreateScreenResources;
xf86SetBlackWhitePixels(pScreen); xf86SetBlackWhitePixels(pScreen);

View File

@ -29,6 +29,9 @@
* Aaron Plattner <aplattner@nvidia.com> * Aaron Plattner <aplattner@nvidia.com>
*/ */
#ifndef XSERVER_XFREE86_DRIVER_H
#define XSERVER_XFREE86_DRIVER_H
#include <errno.h> #include <errno.h>
#include <drm.h> #include <drm.h>
#include <xf86drm.h> #include <xf86drm.h>
@ -261,3 +264,5 @@ void ms_drain_drm_events(ScreenPtr screen);
Bool ms_window_has_variable_refresh(modesettingPtr ms, WindowPtr win); Bool ms_window_has_variable_refresh(modesettingPtr ms, WindowPtr win);
void ms_present_set_screen_vrr(ScrnInfoPtr scrn, Bool vrr_enabled); void ms_present_set_screen_vrr(ScrnInfoPtr scrn, Bool vrr_enabled);
Bool ms_tearfree_is_active_on_crtc(xf86CrtcPtr crtc); Bool ms_tearfree_is_active_on_crtc(xf86CrtcPtr crtc);
#endif /* XSERVER_XFREE86_DRIVER_H */

View File

@ -29,6 +29,7 @@
*/ */
#ifndef _VBE_MODES_H #ifndef _VBE_MODES_H
#define _VBE_MODES_H
/* /*
* This is intended to be stored in the DisplayModeRec's private area. * This is intended to be stored in the DisplayModeRec's private area.

View File

@ -417,7 +417,6 @@ CheckVersion(const char *module, XF86ModuleVersionInfo * data,
{ {
int vercode[4]; int vercode[4];
long ver = data->xf86version; long ver = data->xf86version;
MessageType errtype;
LogMessage(X_INFO, "Module %s: vendor=\"%s\"\n", LogMessage(X_INFO, "Module %s: vendor=\"%s\"\n",
data->modname ? data->modname : "UNKNOWN!", data->modname ? data->modname : "UNKNOWN!",
@ -458,6 +457,7 @@ CheckVersion(const char *module, XF86ModuleVersionInfo * data,
vermaj = GET_ABI_MAJOR(ver); vermaj = GET_ABI_MAJOR(ver);
vermin = GET_ABI_MINOR(ver); vermin = GET_ABI_MINOR(ver);
if (abimaj != vermaj) { if (abimaj != vermaj) {
MessageType errtype;
if (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL) if (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL)
errtype = X_WARNING; errtype = X_WARNING;
else else
@ -469,6 +469,7 @@ CheckVersion(const char *module, XF86ModuleVersionInfo * data,
return FALSE; return FALSE;
} }
else if (abimin > vermin) { else if (abimin > vermin) {
MessageType errtype;
if (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL) if (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL)
errtype = X_WARNING; errtype = X_WARNING;
else else

View File

@ -29,6 +29,9 @@
/* exported functions are/were used by the X Server */ /* exported functions are/were used by the X Server */
#ifndef XSERVER_XFREE86_CONFIGPROCS_H
#define XSERVER_XFREE86_CONFIGPROCS_H
#include <X11/Xfuncproto.h> #include <X11/Xfuncproto.h>
/* Device.c */ /* Device.c */
@ -146,3 +149,5 @@ xf86freeExtensions(XF86ConfExtensionsPtr ptr);
void void
ErrorF(const char *f, ...); ErrorF(const char *f, ...);
#endif #endif
#endif /* XSERVER_XFREE86_CONFIGPROCS_H */

View File

@ -154,13 +154,6 @@ ddxGiveUp(enum ExitCode error)
xnestCloseDisplay(); xnestCloseDisplay();
} }
#ifdef __APPLE__
void
DarwinHandleGUI(int argc, char *argv[])
{
}
#endif
void void
OsVendorInit(void) OsVendorInit(void)
{ {

View File

@ -164,7 +164,7 @@ Bool
xnestOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) xnestOpenScreen(ScreenPtr pScreen, int argc, char *argv[])
{ {
unsigned long valuemask; unsigned long valuemask;
VisualID defaultVisual; VisualID defaultVisual = 0;
int rootDepth; int rootDepth;
miPointerScreenPtr PointPriv; miPointerScreenPtr PointPriv;

View File

@ -6,6 +6,9 @@
// Copyright (c) 2021 Apple Inc. All rights reserved. // Copyright (c) 2021 Apple Inc. All rights reserved.
// //
#ifndef XSERVER_XQUARTZ_NSUSERDEFAULTS_XQUARTZDEFAULTS_H
#define XSERVER_XQUARTZ_NSUSERDEFAULTS_XQUARTZDEFAULTS_H
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
extern NSString * const XQuartzPrefKeyAppsMenu; extern NSString * const XQuartzPrefKeyAppsMenu;
@ -47,3 +50,5 @@ extern NSString * const XQuartzPrefKeySyncPrimaryOnSelect;
+ (NSUserDefaults *)xquartzDefaults; + (NSUserDefaults *)xquartzDefaults;
@end @end
#endif /* XSERVER_XQUARTZ_NSUSERDEFAULTS_XQUARTZDEFAULTS_H */

View File

@ -690,7 +690,6 @@ SNotifyEvent(xAppleWMNotifyEvent *from, xAppleWMNotifyEvent *to)
static int static int
SProcAppleWMQueryVersion(register ClientPtr client) SProcAppleWMQueryVersion(register ClientPtr client)
{ {
REQUEST(xAppleWMQueryVersionReq);
return ProcAppleWMQueryVersion(client); return ProcAppleWMQueryVersion(client);
} }

View File

@ -38,6 +38,7 @@
#include "os/ddx_priv.h" #include "os/ddx_priv.h"
#include "os/log_priv.h" #include "os/log_priv.h"
#include "os/osdep.h" #include "os/osdep.h"
#include "xkb/xkbsrv_priv.h"
#include "os.h" #include "os.h"
#include "servermd.h" #include "servermd.h"

View File

@ -50,7 +50,7 @@
* needs and simply execs the startup script which then execs the main binary. * needs and simply execs the startup script which then execs the main binary.
*/ */
static char *executable_path() { static char *executable_path(void) {
uint32_t bufsize = PATH_MAX; uint32_t bufsize = PATH_MAX;
char *buf = calloc(1, bufsize); char *buf = calloc(1, bufsize);

View File

@ -62,7 +62,7 @@ x11_bin = executable('X11.bin',
mach_startup[3], # mach_startupUser.c mach_startup[3], # mach_startupUser.c
], ],
link_with: x11_bin_libs, link_with: x11_bin_libs,
dependencies: [xproto_dep, x11_bin_deps, mach_startup_dep], dependencies: [xproto_dep, x11_dep, x11_bin_deps, mach_startup_dep],
include_directories: [inc, '..', top_dir_inc], include_directories: [inc, '..', top_dir_inc],
c_args: xquartz_defs, c_args: xquartz_defs,
link_args: ['-Objc'], link_args: ['-Objc'],

View File

@ -76,7 +76,7 @@ libXquartz = static_library('Xquartz',
c_args: libxquartz_defs, c_args: libxquartz_defs,
objc_args: libxquartz_defs, objc_args: libxquartz_defs,
include_directories: [inc, '../../pseudoramiX', '../../miext/rootless', top_dir_inc], include_directories: [inc, '../../pseudoramiX', '../../miext/rootless', top_dir_inc],
dependencies: [xproto_dep, pixman_dep], dependencies: [xproto_dep, xdmcp_dep, pixman_dep],
link_with: [libxserver_pseudoramix, libxserver_miext_rootless], link_with: [libxserver_pseudoramix, libxserver_miext_rootless],
) )

View File

@ -33,6 +33,8 @@
#include <dix-config.h> #include <dix-config.h>
#include "dix/dix_priv.h"
#include "quartzRandR.h" #include "quartzRandR.h"
#include "inputstr.h" #include "inputstr.h"
#include "quartz.h" #include "quartz.h"

View File

@ -394,7 +394,6 @@ SNotifyEvent(xAppleDRINotifyEvent *from,
static int static int
SProcAppleDRIQueryVersion(register ClientPtr client) SProcAppleDRIQueryVersion(register ClientPtr client)
{ {
REQUEST(xAppleDRIQueryVersionReq);
return ProcAppleDRIQueryVersion(client); return ProcAppleDRIQueryVersion(client);
} }

View File

@ -28,6 +28,8 @@
*/ */
#ifndef DRIWRAP_H #ifndef DRIWRAP_H
#define DRIWRAP_H
#include "scrnintstr.h" #include "scrnintstr.h"
Bool Bool

View File

@ -4,9 +4,14 @@
* Authors: Alexander Gottwald * Authors: Alexander Gottwald
*/ */
#ifndef XSERVER_XWIN_WINPRIV_H
#define XSERVER_XWIN_WINPRIV_H
#include <X11/Xwindows.h> #include <X11/Xwindows.h>
#include <windowstr.h> #include <windowstr.h>
HWND winGetWindowInfo(WindowPtr pWin); HWND winGetWindowInfo(WindowPtr pWin);
Bool winCheckScreenAiglxIsSupported(ScreenPtr pScreen); Bool winCheckScreenAiglxIsSupported(ScreenPtr pScreen);
void winSetScreenAiglxIsActive(ScreenPtr pScreen); void winSetScreenAiglxIsActive(ScreenPtr pScreen);
#endif /* XSERVER_XWIN_WINPRIV_H */

View File

@ -19,8 +19,13 @@
* IN THE SOFTWARE. * IN THE SOFTWARE.
*/ */
#ifndef XSERVER_XWIN_WINAUTH_H
#define XSERVER_XWIN_WINAUTH_H
#include <xcb/xcb.h> #include <xcb/xcb.h>
#include <X11/Xmd.h> // for BOOL #include <X11/Xmd.h> // for BOOL
BOOL winGenerateAuthorization(void); BOOL winGenerateAuthorization(void);
xcb_auth_info_t * winGetXcbAuthInfo(void); xcb_auth_info_t * winGetXcbAuthInfo(void);
#endif /* XSERVER_XWIN_WINAUTH_H */

View File

@ -27,6 +27,9 @@
* XKB settings. * XKB settings.
*/ */
#ifndef XSERVER_XWIN_WINLAYOUTS_H
#define XSERVER_XWIN_WINLAYOUTS_H
typedef struct { typedef struct {
unsigned int winlayout; unsigned int winlayout;
int winkbtype; int winkbtype;
@ -98,3 +101,5 @@ WinKBLayoutRec winKBLayouts[] = {
See http://technet.microsoft.com/en-us/library/cc766503%28WS.10%29.aspx See http://technet.microsoft.com/en-us/library/cc766503%28WS.10%29.aspx
for a listing of input locale (keyboard layout) codes for a listing of input locale (keyboard layout) codes
*/ */
#endif /* XSERVER_XWIN_WINLAYOUTS_H */

View File

@ -27,6 +27,9 @@ from The Open Group.
*/ */
#ifndef XSERVER_XWIN_WINMONITORS_H
#define XSERVER_XWIN_WINMONITORS_H
/* data returned for monitor information */ /* data returned for monitor information */
struct GetMonitorInfoData { struct GetMonitorInfoData {
int requestedMonitor; int requestedMonitor;
@ -41,3 +44,5 @@ struct GetMonitorInfoData {
}; };
Bool QueryMonitor(int i, struct GetMonitorInfoData *data); Bool QueryMonitor(int i, struct GetMonitorInfoData *data);
#endif /* XSERVER_XWIN_WINMONITORS_H */

View File

@ -1,8 +1,13 @@
/* Do not include this file directly. It is included at the end of <dix-config.h> */ /* Do not include this file directly. It is included at the end of <dix-config.h> */
#ifndef XSERVER_CONFIG_APPLE_VERBATIM_H
#define XSERVER_CONFIG_APPLE_VERBATIM_H
/* Correctly set _XSERVER64 for OSX fat binaries */ /* Correctly set _XSERVER64 for OSX fat binaries */
#if defined(__LP64__) && !defined(_XSERVER64) #if defined(__LP64__) && !defined(_XSERVER64)
#define _XSERVER64 1 #define _XSERVER64 1
#elif !defined(__LP64__) && defined(_XSERVER64) #elif !defined(__LP64__) && defined(_XSERVER64)
#undef _XSERVER64 #undef _XSERVER64
#endif #endif
#endif /* XSERVER_CONFIG_APPLE_VERBATIM_H */

View File

@ -696,6 +696,10 @@ typedef struct _Screen {
CallbackListPtr hookPostCreateResources; CallbackListPtr hookPostCreateResources;
SetWindowVRRModeProcPtr SetWindowVRRMode; SetWindowVRRModeProcPtr SetWindowVRRMode;
/* additional screen post-close notify hooks (replaces wrapping CloseScreen)
should NOT be touched outside of DIX core */
CallbackListPtr hookPostClose;
} ScreenRec; } ScreenRec;
static inline RegionPtr static inline RegionPtr

View File

@ -4,6 +4,10 @@
* This file has all defines used in the xwin ddx * This file has all defines used in the xwin ddx
* *
*/ */
#ifndef XSERVER_XWIN_CONFIG_H
#define XSERVER_XWIN_CONFIG_H
#include <dix-config.h> #include <dix-config.h>
/* Winsock networking */ /* Winsock networking */
@ -17,3 +21,5 @@
/* Whether we should re-locate the root to where the executable lives */ /* Whether we should re-locate the root to where the executable lives */
#mesondefine RELOCATE_PROJECTROOT #mesondefine RELOCATE_PROJECTROOT
#endif /* XSERVER_XWIN_CONFIG_H */

View File

@ -3,10 +3,10 @@ project('xserver', 'c',
'buildtype=debugoptimized', 'buildtype=debugoptimized',
'c_std=gnu99', 'c_std=gnu99',
], ],
version: '25.0.0.1', version: '25.0.0.4',
meson_version: '>= 0.58.0', meson_version: '>= 0.58.0',
) )
release_date = '2025-06-21' release_date = '2025-07-04'
add_project_arguments('-DHAVE_DIX_CONFIG_H', language: ['c', 'objc']) add_project_arguments('-DHAVE_DIX_CONFIG_H', language: ['c', 'objc'])
cc = meson.get_compiler('c') cc = meson.get_compiler('c')
@ -777,7 +777,8 @@ endif
subdir('hw') subdir('hw')
if host_machine.system() != 'windows' build_tests = get_option('tests') and host_machine.system() != 'windows'
if build_tests
subdir('test') subdir('test')
endif endif

View File

@ -110,6 +110,8 @@ option('sha1', type: 'combo', choices: ['libc', 'CommonCrypto', 'CryptoAPI', 'li
description: 'SHA1 implementation') description: 'SHA1 implementation')
option('xf86-input-inputtest', type: 'boolean', value: true, option('xf86-input-inputtest', type: 'boolean', value: true,
description: 'Test input driver support on Xorg') description: 'Test input driver support on Xorg')
option('tests', type: 'boolean', value: true,
description: 'Build tests for the X server on platforms that support it')
option('dri1', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build DRI1 extension (default: auto)') option('dri1', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build DRI1 extension (default: auto)')
option('dri2', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build DRI2 extension (default: auto)') option('dri2', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build DRI2 extension (default: auto)')

View File

@ -40,7 +40,7 @@ hdrs_mi = [
'mizerarc.h', 'mizerarc.h',
] ]
libxserver_mi = static_library('libxserver_mi', libxserver_mi = static_library('xserver_mi',
srcs_mi, srcs_mi,
include_directories: inc, include_directories: inc,
dependencies: [ dependencies: [

View File

@ -1,4 +1,3 @@
/* /*
Copyright 1994, 1998 The Open Group Copyright 1994, 1998 The Open Group
@ -26,6 +25,7 @@ in this Software without prior written authorization from The Open Group.
*/ */
#ifndef MILINE_H #ifndef MILINE_H
#define MILINE_H
#include "screenint.h" #include "screenint.h"
#include "privates.h" #include "privates.h"

View File

@ -141,7 +141,7 @@ miPointerInitialize(ScreenPtr pScreen,
pScreenPriv->screenFuncs = screenFuncs; pScreenPriv->screenFuncs = screenFuncs;
pScreenPriv->waitForUpdate = waitForUpdate; pScreenPriv->waitForUpdate = waitForUpdate;
pScreenPriv->showTransparent = FALSE; pScreenPriv->showTransparent = FALSE;
dixScreenHookClose(pScreen, miPointerCloseScreen); dixScreenHookPostClose(pScreen, miPointerCloseScreen);
dixSetPrivate(&pScreen->devPrivates, miPointerScreenKey, pScreenPriv); dixSetPrivate(&pScreen->devPrivates, miPointerScreenKey, pScreenPriv);
/* /*
* set up screen cursor method table * set up screen cursor method table
@ -169,7 +169,7 @@ static void miPointerCloseScreen(CallbackListPtr *pcbl, ScreenPtr pScreen, void
{ {
SetupScreen(pScreen); SetupScreen(pScreen);
dixScreenUnhookClose(pScreen, miPointerCloseScreen); dixScreenUnhookPostClose(pScreen, miPointerCloseScreen);
free((void *) pScreenPriv); free((void *) pScreenPriv);
dixSetPrivate(&pScreen->devPrivates, miPointerScreenKey, NULL); dixSetPrivate(&pScreen->devPrivates, miPointerScreenKey, NULL);
FreeEventList(mipointermove_events, GetMaximumEventsNum()); FreeEventList(mipointermove_events, GetMaximumEventsNum());

View File

@ -78,6 +78,9 @@ from The Open Group.
* drawn (as with the even-odd rule). * drawn (as with the even-odd rule).
*/ */
#ifndef XSERVER_MIPOLY_H
#define XSERVER_MIPOLY_H
/* /*
* for the winding number rule * for the winding number rule
*/ */
@ -172,3 +175,5 @@ typedef struct _ScanLineListBlock {
pAET = pAET->next; \ pAET = pAET->next; \
} \ } \
} }
#endif /* XSERVER_MIPOLY_H */

View File

@ -1,11 +1,3 @@
/*
* misprite.h
*
* software-sprite/sprite drawing interface spec
*
* mi versions of these routines exist.
*/
/* /*
Copyright 1989, 1998 The Open Group Copyright 1989, 1998 The Open Group
@ -31,6 +23,17 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group. in this Software without prior written authorization from The Open Group.
*/ */
/*
* misprite.h
*
* software-sprite/sprite drawing interface spec
*
* mi versions of these routines exist.
*/
#ifndef XSERVER_MISPRITE_H
#define XSERVER_MISPRITE_H
Bool miSpriteInitialize(ScreenPtr pScreen, miPointerScreenFuncPtr screenFuncs); Bool miSpriteInitialize(ScreenPtr pScreen, miPointerScreenFuncPtr screenFuncs);
Bool miDCRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); Bool miDCRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor);
@ -44,3 +47,5 @@ Bool miDCRestoreUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
int x, int y, int w, int h); int x, int y, int w, int h);
Bool miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen); Bool miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen);
void miDCDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen); void miDCDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen);
#endif /* XSERVER_MISPRITE_H */

View File

@ -28,6 +28,9 @@ from The Open Group.
/* Author: Keith Packard, MIT X Consortium */ /* Author: Keith Packard, MIT X Consortium */
#ifndef XSERVER_MIWIDELINE_H
#define XSERVER_MIWIDELINE_H
#include "mifpoly.h" /* for ICEIL */ #include "mifpoly.h" /* for ICEIL */
/* /*
@ -91,3 +94,5 @@ typedef struct _LineFace {
ValidateGC (pDrawable, pGC); \ ValidateGC (pDrawable, pGC); \
} \ } \
} }
#endif /* XSERVER_MIWIDELINE_H */

View File

@ -24,6 +24,9 @@ in this Software without prior written authorization from The Open Group.
********************************************************/ ********************************************************/
#ifndef XSERVER_MIZERARC_H
#define XSERVER_MIZERARC_H
typedef struct { typedef struct {
int x; int x;
int y; int y;
@ -122,3 +125,5 @@ extern _X_EXPORT Bool miZeroArcSetup(xArc * /*arc */ ,
miZeroArcRec * /*info */ , miZeroArcRec * /*info */ ,
Bool /*ok360 */ Bool /*ok360 */
); );
#endif /* XSERVER_MIZERARC_H */

View File

@ -1569,7 +1569,7 @@ damageWindowDestroy(CallbackListPtr *pcbl, ScreenPtr pScreen, WindowPtr pWindow)
static void damageCloseScreen(CallbackListPtr *pcbl, ScreenPtr pScreen, void *unused) static void damageCloseScreen(CallbackListPtr *pcbl, ScreenPtr pScreen, void *unused)
{ {
dixScreenUnhookClose(pScreen, damageCloseScreen); dixScreenUnhookPostClose(pScreen, damageCloseScreen);
dixScreenUnhookWindowDestroy(pScreen, damageWindowDestroy); dixScreenUnhookWindowDestroy(pScreen, damageWindowDestroy);
dixScreenUnhookPixmapDestroy(pScreen, damagePixmapDestroy); dixScreenUnhookPixmapDestroy(pScreen, damagePixmapDestroy);
@ -1667,7 +1667,7 @@ DamageSetup(ScreenPtr pScreen)
pScrPriv->internalLevel = 0; pScrPriv->internalLevel = 0;
pScrPriv->pScreenDamage = 0; pScrPriv->pScreenDamage = 0;
dixScreenHookClose(pScreen, damageCloseScreen); dixScreenHookPostClose(pScreen, damageCloseScreen);
dixScreenHookWindowDestroy(pScreen, damageWindowDestroy); dixScreenHookWindowDestroy(pScreen, damageWindowDestroy);
dixScreenHookPixmapDestroy(pScreen, damagePixmapDestroy); dixScreenHookPixmapDestroy(pScreen, damagePixmapDestroy);

View File

@ -7,7 +7,7 @@ hdrs_miext_damage = [
'damagestr.h', 'damagestr.h',
] ]
libxserver_miext_damage = static_library('libxserver_miext_damage', libxserver_miext_damage = static_library('xserver_miext_damage',
srcs_miext_damage, srcs_miext_damage,
include_directories: inc, include_directories: inc,
dependencies: common_dep, dependencies: common_dep,

View File

@ -6,7 +6,7 @@ srcs_miext_rootless = [
'rootlessWindow.c', 'rootlessWindow.c',
] ]
libxserver_miext_rootless = static_library('libxserver_miext_rootless', libxserver_miext_rootless = static_library('xserver_miext_rootless',
srcs_miext_rootless, srcs_miext_rootless,
include_directories: inc, include_directories: inc,
dependencies: common_dep, dependencies: common_dep,

View File

@ -34,6 +34,8 @@
#ifndef _ROOTLESSWINDOW_H #ifndef _ROOTLESSWINDOW_H
#define _ROOTLESSWINDOW_H #define _ROOTLESSWINDOW_H
#include "dix/screen_hooks_priv.h"
#include "rootlessCommon.h" #include "rootlessCommon.h"
Bool RootlessCreateWindow(WindowPtr pWin); Bool RootlessCreateWindow(WindowPtr pWin);

View File

@ -27,6 +27,9 @@
* DEALINGS IN THE SOFTWARE. * DEALINGS IN THE SOFTWARE.
*/ */
#ifndef XSERVER_C2P_CORE_H
#define XSERVER_C2P_CORE_H
#include "os/bug_priv.h" #include "os/bug_priv.h"
/* /*
@ -186,3 +189,5 @@ static inline void transp2x(CARD32 d[], unsigned int n)
_transp(d, 1, 0, n, mask); _transp(d, 1, 0, n, mask);
return; return;
} }
#endif /* XSERVER_C2P_CORE_H */

View File

@ -29,7 +29,7 @@ hdrs_miext_shadow = [
'shadow.h', 'shadow.h',
] ]
libxserver_miext_shadow = static_library('libxserver_miext_shadow', libxserver_miext_shadow = static_library('xserver_miext_shadow',
srcs_miext_shadow, srcs_miext_shadow,
include_directories: inc, include_directories: inc,
dependencies: common_dep, dependencies: common_dep,

View File

@ -14,7 +14,7 @@ if build_dri3
srcs_miext_sync += 'misyncshm.c' srcs_miext_sync += 'misyncshm.c'
endif endif
libxserver_miext_sync = static_library('libxserver_miext_sync', libxserver_miext_sync = static_library('xserver_miext_sync',
srcs_miext_sync, srcs_miext_sync,
include_directories: inc, include_directories: inc,
dependencies: [ dependencies: [

View File

@ -410,6 +410,10 @@ vpnprintf(char *string, int size_in, const char *f, va_list args)
f_idx++; f_idx++;
/* silently ignore reverse justification */
if (f[f_idx] == '-')
f_idx++;
/* silently swallow minimum field width */ /* silently swallow minimum field width */
if (f[f_idx] == '*') { if (f[f_idx] == '*') {
f_idx++; f_idx++;

View File

@ -79,7 +79,7 @@ endif
libxlibc = [] libxlibc = []
if srcs_libc.length() > 0 if srcs_libc.length() > 0
libxlibc = static_library('libxlibc', libxlibc = static_library('xlibc',
srcs_libc, srcs_libc,
include_directories: inc, include_directories: inc,
dependencies: [ dependencies: [
@ -92,7 +92,7 @@ if enable_input_thread
os_dep += cc.find_library('pthread') os_dep += cc.find_library('pthread')
endif endif
libxserver_os = static_library('libxserver_os', libxserver_os = static_library('xserver_os',
srcs_os, srcs_os,
include_directories: inc, include_directories: inc,
dependencies: [ dependencies: [

Some files were not shown because too many files have changed in this diff Show More