Commit graph xserver/doc
Author SHA1 Message Date
Mason Green
999015f6cd Xext/namespace: fix memory leak during namespace destruction
When a transient namespace is deleted, XnsDestroyNamespace() frees the
namespace struct, its name, and its authentication tokens. However, it
leaves the virtual root window active in the server's resource database.

Because the virtual root window is never freed, the server leaks a Window
structure, window attributes, and properties every time a temporary
namespace is destroyed.

Fix this leak by calling FreeResource() on the virtual root window
before destroying the namespace.

Also update the formal TLA+ model in doc/Xnamespace.tla to track
resource cleanup and verify the fix.

Signed-off-by: Mason Green <mason@greenm01.net>
2026-10-07 16:01:44 +02:00
Mason Green
e0160fdb7d Xext/namespace: fix potential NULL-pointer dereference in select_ns()
When the configuration file is parsed at server startup, select_ns()
dynamically allocates namespace structures. However, it does not check
whether calloc() or strdup() successfully allocate memory.

If calloc() fails, the server dereferences a NULL pointer and crashes
instantly.

If strdup() fails, the namespace is added to the global list with a
NULL name. When the server later searches for a namespace, it calls
strlen() on the NULL name. This causes a delayed crash of the server
at runtime.

Fix this by adding standard FatalError() checks to handle allocation
failures safely during startup.

Also include a formal TLA+ verification model of the Xnamespace
security isolation extension in doc/Xnamespace.tla.

Signed-off-by: Mason Green <mason@greenm01.net>
2026-10-07 16:01:44 +02:00
Enrico Weigelt, metux IT consult
0523619977 doc: Xnamespace-protocol: fix stale attribute names in CreateNamespace/§8
CreateNamespace's field comment and the §8 required-changes list still
named the pre-implementation identifiers XnsAttrAutoRemove/XnsAttrBuiltin;
the actual wire constants are XNS_ATTR_TRANSIENT/XNS_ATTR_IMMUTABLE. Also
clean up the garbled §8 item 4 sentence.

Flagged as an advisory (non-blocking) note in the bot review.

Signed-off-by: Enrico Weigelt, metux IT consult <enrico.weigelt@vnc.biz>
2026-07-03 20:05:08 +02:00
Enrico Weigelt, metux IT consult
410e0ac3af Xext: namespace: add Xnamespace management protocol extension
Add a superPower-only X11 extension (X-NAMESPACE) for managing namespaces
at runtime, the settings that were previously only provisionable from the
namespace.conf file at startup.

Requests: QueryVersion, {List,Create,Delete,Query}Namespace,
SetNamespaceFlags, {Add,Remove,List}AuthToken and GetClientNamespace.
Names are the wire identifier; capabilities/attributes are bitmasks.
Transient namespaces auto-remove when their last client exits.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-07-03 20:05:08 +02:00
Diego Viola
01e3bbf4c8 Fix typos
Some checks failed
Build X servers / xserver-build-ubuntu (push) Has been cancelled
Build X servers / drivers-build-ubuntu (push) Has been cancelled
Build X servers / xserver-build-mingw32-ubuntu (push) Has been cancelled
Build X servers / xserver-build-macos (push) Has been cancelled
Build X servers / xserver-build-freebsd (push) Has been cancelled
Build X servers / xserver-build-dragonflybsd (push) Has been cancelled
Build X servers / xserver-build-netbsd (push) Has been cancelled
Build X servers / xserver-build-cygwin (push) Has been cancelled
Build X servers / Check Signed-Off-By (push) Has been cancelled
check PRs for merge conflicts / notify (push) Has been cancelled
Build X servers / Release pushed tag (push) Has been cancelled
Signed-off-by: Diego Viola <diego.viola@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2134>
2026-04-19 12:32:26 +02:00
stefan11111
e6a0fa4b0c Treewide: Fix typos
Signed-off-by: Diego Viola <diego.viola@gmail.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2134>

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

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

67c82078fe does not
apply to Xlibre

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2026-03-16 13:11:07 +01:00
Enrico Weigelt, metux IT consult
cff61f6fe6 doc: replace DDXPoint by xPoint
DDXPoint is just an alias to xPoint

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-02-10 15:59:08 +01:00
Enrico Weigelt, metux IT consult
8039c2cbf1 dix: unexport SwapLongs()
Not used by any external drivers, so no need to keep it in public SDK.
Since it's used by internal modules, still needs to be _X_EXPORT'ed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-25 18:26:02 +01:00
Enrico Weigelt, metux IT consult
0b3aaa0369 os: drop ResetWellKnownSockets() and XdmcpReset()
Since internal server reset is gone, those aren't needed anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-11-20 19:22:44 +01:00
Enrico Weigelt, metux IT consult
7f74632448 dix: rename DevScreenPrivateKey to DevScreenPrivateKeyPtr
Some checks are pending
Build X servers / xserver-build-ubuntu (push) Waiting to run
Build X servers / drivers-build-ubuntu (push) Waiting to run
Build X servers / xserver-build-mingw32-ubuntu (push) Waiting to run
Build X servers / xserver-build-macos (push) Waiting to run
Build X servers / xserver-build-freebsd (push) Waiting to run
Build X servers / xserver-build-dragonflybsd (push) Waiting to run
Build X servers / Release pushed tag (push) Blocked by required conditions
check PRs for merge conflicts / notify (push) Waiting to run
delete old workflow runs / delete_old_workflow_runs (push) Waiting to run
delete old workflow runs / purge_deleted_branch_workflows (push) Waiting to run
Be a bit more consistent in naming. We call all our pointer-to-struct
types <xyz>Ptr.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-10-28 15:40:42 +01:00
Enrico Weigelt, metux IT consult
56c4d68140 treewide: drop ScreenInfoPtr parameter from InitOutput()
Some checks failed
Build X servers / xserver-build-ubuntu (push) Has been cancelled
Build X servers / drivers-build-ubuntu (push) Has been cancelled
Build X servers / xserver-build-mingw32-ubuntu (push) Has been cancelled
Build X servers / xserver-build-macos (push) Has been cancelled
Build X servers / xserver-build-freebsd (push) Has been cancelled
check PRs for merge conflicts / notify (push) Has been cancelled
Build X servers / Release pushed tag (push) Has been cancelled
Nobody's using this pointer anymore, everybody's using the global
screenInfo structure.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-09-12 19:49:23 +02:00
Enrico Weigelt, metux IT consult
7c3ddc80ef dix: drop obsolete WriteSwappedDataToClient() macro
This macro isn't and shouldn't be used anymore, so get rid of it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-08-22 15:45:47 +02:00
Enrico Weigelt, metux IT consult
d71ca03756 doc: Xinput.xml: some indention cleanups
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 17:40:01 +02:00
Enrico Weigelt, metux IT consult
09a80bb1d5 doc: Xserver-spec.xml: replace tabs by 8 characters
Little indention cleanup.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 17:32:22 +02:00
Enrico Weigelt, metux IT consult
8bdc1a6cf3 Revert "doc: refactor and improve X11 input extension porting documentation"
This reverts commit b1ff69a654.

broke the docs build ... and it also seems certain pieces got even missing.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-31 17:27:00 +02:00
Janne Rovio
b1ff69a654 doc: refactor and improve X11 input extension porting documentation
* Removed unnecessary comments (<!-- .LP -->).
* Corrected punctuation and improved sentence structure.
* Ensured consistent capitalization (e.g., "X11" vs "X Server").
* Fixed minor typos and spelling errors.

Signed-off-by: Janne Rovio trollsix10@gmail.com
2025-07-31 16:10:28 +02:00
Enrico Weigelt, metux IT consult
e3acb2454c include: drop obsolete WriteReplyToClient() macro
Some checks are pending
Build X servers / xserver-build-ubuntu (push) Waiting to run
Build X servers / drivers-build-ubuntu (push) Waiting to run
Build X servers / xserver-build-macos (push) Waiting to run
Build X servers / Release pushed tag (push) Waiting to run
Not used anymore, and not part of ABI, so no need to keep it around
any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-18 05:25:56 +02:00
Enrico Weigelt, metux IT consult
269012b827 Xnamespace: add some documentation
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 17:21:48 +02:00
Enrico Weigelt, metux IT consult
b528301f97 dix: unexport and document ClientSignal()
Not used by any external drivers, so no need to keep it exported.

Also renamed to dixClientSignal(), since there's a conflicting prototype
in fontsproto.h.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:17:49 +02:00
Enrico Weigelt, metux IT consult
1dc648b1b7 os: drop unused TimerCheck()
This isn't used anywhere, so can be dropped.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1789>
2025-02-23 17:46:13 +00:00
Enrico Weigelt, metux IT consult
a6b2eb3780 misc.h: drop LengthRestB() macro
Only used at exactly one place, for trivial size computation, so not worth
having an extra macro in a public header for this.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1805>
2025-02-17 19:25:14 +00:00
Enrico Weigelt, metux IT consult
f209ac2014 doc: drop removed PaintWindowBackground() and PaintWindowBorder()
These have been removed 1.5 decades ago.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1785>
2025-02-17 19:05:55 +00:00
Enrico Weigelt, metux IT consult
984da40fbb doc: document that ScreenRec->DestroyPixmap() shouldn't be called directly
Direct calls to ScreenRec->DestroyPixmap() is fragile and blocks cleaning up
the wrapping jungle, so use the proper dix function instead.

While this function originally wasn't made for that purpose (and so we have an
useless parameter here, and the naming isn't entirely correct), it's the best
effort we have right now, without breaking existing API: it's already exported
since long time, so drivers can be easily converted and still work with both
new and older Xserver ABI versions.

Retrospectively, this already should have been done 20 years ago.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1711>
2025-02-12 17:48:26 +01:00
Enrico Weigelt, metux IT consult
1bfa4876f6 dix: move colormap flags into colormap_priv.h and rename them
These aren't used by any drivers/modules, so no need to keep them exported.
As already touching them, give them a proper name prefix for clarity.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1581>
2024-09-01 22:06:50 +00:00
Enrico Weigelt, metux IT consult
588b97b932 doc: drop removed functions from the Xserver spec
The recently dropped mi functions shouldn't be described as "provided by MI"
anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1502>
2024-08-29 19:34:09 +02:00
Enrico Weigelt, metux IT consult
a716484926 mi: drop obsolete mibitblt.c
This file is practically empty now, so we can remove it.

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

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

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1355>
2024-04-15 18:59:23 -07:00
Enrico Weigelt, metux IT consult
af9f70013a dix: dixutils: make workQueue pointer dix-private
The workQueue pointer is currently declared extern, so that WaitForSomething()
can check wether we've got something in the queue and call ProcessWorkQueue()
then.

But that's trivial to simplify: just let ProcessWorkQueue() return early if
workQueue == NULL. Gives us a better isolation of internal stuff as well as
ProcessWorkQueue() protecting itself from possible segfault.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1310>
2024-02-23 23:06:38 +00:00
Povilas Kanapickas
c97397dc47 Remove autotools support
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2021-10-27 13:15:40 +03:00
Povilas Kanapickas
18d3131f9a meson: Implement developer documentation build
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2021-08-20 10:26:07 +00:00
Alan Coopersmith
0006aecba0 doc: Update URLs in Xserver-DTrace.xml
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-07-05 13:18:45 -07:00
Alan Coopersmith
23e83724df Fix spelling/wording issues
Most (but not all) of these were found by using
  codespell --builtin clear,rare,usage,informal,code,names
but not everything reported by that was fixed.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2020-07-05 13:07:33 -07:00
Adam Jackson
ff310903f3 mi: Add a default no-op miSourceValidate
Slightly simplifies the callers since they don't need to check for
non-NULL anymore.

I do extremely hate the workarounds here to suppress misprite taking the
cursor down though. Surely there's a better way.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
2019-10-30 16:26:01 +00:00
Jon Turney
2afee831a4 hw/xwin: Add an option to use alpha channel in multiwindow mode
Add an option to turn on the use of the X window's alpha channel in
multiwindow mode, i.e. this uses the X window's alpha channel for
compositing into the native desktop.

This works on W7/Vista (using DwmEnableBlurBehindWindow()), and Windows
10 (using the undocumented SetWindowCompositionAttribute()), but not on
Windows 8/8.1

-compositewm must be enabled for this to be useful, as we only have a
pixmap with an alpha channel for the X window in that case.  The
framebuffer/root window doesn't have one (unless perhaps you are using
the rootless extension, maybe...).

v2:
Update meson.build

Future work:

A window property to control use of alpha?
Option to turn off blur on W7/Vista
Implement _NET_WM_WINDOW_OPACITY
2019-06-17 21:56:35 +00:00
Adam Jackson
03b2125005 dix: Remove LegalModifier()
This hasn't done anything besides return TRUE in a long long time.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-09-28 16:25:17 -04:00
Adam Jackson
a23eba2a91 dix: Merge AbortDDX into ddxGiveUp
These are so close to identical that most DDXes implement one in terms
of the other. All the relevant cases can be distinguished by the error
code, so merge the functions together to make things simpler.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-09-28 16:25:12 -04:00
Eric Anholt
563b6ee873 Rewrite the byte swapping macros.
The clever pointer tricks were actually not working, and we were doing
the byte-by-byte moves in general.  By just doing the memcpy and
obvious byte swap code, we end up generating actual byte swap
instructions, thanks to optimizing compilers.

         text	   data	    bss	    dec	    hex	filename
before: 2240807	  51552	 132016	2424375	 24fe37	hw/xfree86/Xorg
after:  2215167	  51552	 132016	2398735	 249a0f	hw/xfree86/Xorg

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
2017-04-25 15:01:23 -07:00
Keith Packard
fb0802113b Remove readmask from screen block/wakeup handler
With no users of the interface needing the readmask anymore, we can
remove it from the argument passed to these functions.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2016-07-18 15:27:51 -04:00
Cyril Brulebois
3d9f578e6f doc: Convert an \fP pair into appropriate tags.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2015-09-23 10:32:53 -04:00
Cyril Brulebois
d97ffef1ab doc: Try to avoid repetitions.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2015-09-23 10:31:55 -04:00
Cyril Brulebois
2cce6ffc35 doc: Fix punctuation.
[ajax: s/ponct/punct/]

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2015-09-23 10:31:12 -04:00
Cyril Brulebois
e7e3320098 doc: Fix extraneous &gt;
It looks like it serves no special purpose.

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2015-09-23 10:30:38 -04:00
Cyril Brulebois
9b4f10d749 doc: Fix grammar and typos.
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2015-09-23 10:30:13 -04:00
Cyril Brulebois
5b92a0a84a doc: Fix alignment.
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2015-09-23 10:29:43 -04:00
Cyril Brulebois
0b8fca667b doc: Fix typo.
Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-09-23 10:28:41 -04:00
Cyril Brulebois
1226f7ddd7 doc: Get rid of RCS tags.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Cyril Brulebois <kibi@debian.org>
2015-09-23 10:27:13 -04:00
Alan Coopersmith
a28202a148 Remove remaining doc references to Xalloc, Xrealloc, and Xfree
Functions were removed in commit cad9b053d5

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21 16:57:07 -07:00
Keith Packard
23a11fd85e doc: Create a script to filter xmlto output
This reduces the build log spam while still preserving the xmlto
status to catch build failures correctly.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-01-05 14:24:06 -08:00
Adam Jackson
cad9b053d5 os: Remove deprecated malloc/free wrappers
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:51:50 -04:00
Jon TURNEY
748be9da20 doc: Update documentation about Windows platforms support a bit
Update what c-extensions says about Windows platforms support a bit:
- Document that MinGW Win32 gets let off being POSIX-compilant
- Document the minimum Windows version supported

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
2012-10-29 12:21:14 +00:00