Commit Graph

2056 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult 69b57fd01f os: move defining LOCK_SERVER into meson
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1320>
2024-07-26 22:26:07 +00:00
Enrico Weigelt, metux IT consult b30edf326b fix missing includes of <X11/Xfuncproto.h>
Several places using _X_ATTRIBUTE_PRINTF macro from X11/Xfuncproto.h
but missing to include it, so it depends on other headers whether it's
included by mere accident, which quickly causes trouble if include order
changes. Cleaning that up by adding explicit include statements.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1580>
2024-07-20 17:18:38 +00:00
Enrico Weigelt, metux IT consult 34662f15af os: unexport fields from opaque.h not used by modules / drivers
There're lots of field that aren't used by any modules or drivers,
thus no need to keep them exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1351>
2024-06-23 21:19:27 +00:00
Enrico Weigelt, metux IT consult 06b599edb6 dix: unexport fields from opaque.h not used by modules/drivers
Lots of fields from opaque.h aren't used by any drivers/modules and thus
don't need to be exported at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1351>
2024-06-23 21:19:27 +00:00
Enrico Weigelt, metux IT consult 53e8ba3aff dix: move party_like_its_1989 into dix_priv.h
Internal symbol, no need to have it in public header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1351>
2024-06-23 21:19:27 +00:00
Enrico Weigelt, metux IT consult 224fa46f26 include: dix.h: fix outdated comment
The comment about ClientPtr also being defined in misc.h is outdated
for about 20 years now: XFree86 4.3.0.1 dropped the redundant definition
over there.

It's still also in Xdefs.h, so the guard is still needed.

Fixes: d568221710
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1514>
2024-06-23 18:13:30 +00:00
Enrico Weigelt, metux IT consult 487eb46826 os: move xserver_poll.h into os/ directory
This header isn't public and holds defines for code in os/ directory,
so no need to keep it in the global header dir - it's probably better
off in os/ directory - just like we already have with many others.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1389>
2024-06-21 00:53:39 +00:00
Enrico Weigelt, metux IT consult cdb4d5648a kbd: move _XkbWantsDetectableAutoRepeat() macro into dix/events.c
That's the only place where it is used, so no need to keep it
in a public header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1462>
2024-06-18 02:10:04 +00:00
Enrico Weigelt, metux IT consult 4a27ff7a1a dix: drop unused args from CreateRootCursor()
The args have become dummies almost two decades ago, so no need
to keep them any longer.

Fixes: 0afeb0241a
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1522>
2024-06-18 01:33:56 +00:00
Enrico Weigelt, metux IT consult fec061fc21 xkb: unexport Xkb* defines used by xkbtext.c
These are only used inside xkb/*, so no need to keep them exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1475>
2024-05-14 03:57:45 +00:00
Enrico Weigelt, metux IT consult 434044cb08 xkb: unexport functions from xkbtext.c
These are only used inside xkb/*, so no need to export them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1475>
2024-05-14 03:57:45 +00:00
Enrico Weigelt, metux IT consult e5c8b664d3 os: unexport ddx callbacks
The DDX callbacks (where core/DIX calls into DDX) aren't supposed to be
called by drivers directly, so unexport them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1332>
2024-05-08 09:37:35 +02:00
Enrico Weigelt, metux IT consult 1fdf97f28d include: xkbfile: clean up forgotten unused declarations
Back in 2008, when cleaning out unused/undefined stuff, some pieces have been
forgotten in commit fb22d4d928.
This was accidentially introduced by 68bd7ac193.

Fixes: fb22d4d928
Fixes: 68bd7ac193
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1473>
2024-05-07 22:43:14 +00:00
Enrico Weigelt, metux IT consult eff7ccc11c include: move private definitions out of exevents.h
Public server module API shouldn't be clobbered with private definitions,
thus move them out to private header.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1289>
2024-04-30 00:47:38 +00:00
Enrico Weigelt, metux IT consult 33350ef8ff include: move private definitions out of extinit.h
Public server module API shouldn't be clobbered with private definitions,
thus move them out to extinit_priv.h.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1289>
2024-04-30 00:47:38 +00:00
Enrico Weigelt, metux IT consult bae6cbc8ca include: move private defs to dixstruct_priv.h
Public server module API shouldn't be clobbered with private definitions,
thus move them out to dixstruct_priv.h

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1289>
2024-04-30 00:47:38 +00:00
Enrico Weigelt, metux IT consult f17bc7e24d include: split out non-exported prototypes to dix_priv.h
Public server module API shouldn't be clobbered with private definitions,
thus move them out to dix-intern.h

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1289>
2024-04-30 00:47:38 +00:00
Enrico Weigelt, metux IT consult 8a2590e5d3 xkb: make XkbInternAtom() static
It's only used in the same .c file, so make it static.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1506>
2024-04-28 23:21:52 +00:00
Enrico Weigelt, metux IT consult feb5c785fc xkb: move *_TIMER defines into xkbAccessX.c
These are only used in this file (and also not any external driver),
so no need to have them in a public header file.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1459>
2024-04-23 02:01:17 +00:00
Enrico Weigelt, metux IT consult 8982344e53 include: move dbus-core.h to config
This header is internal (not installed) and holds definitions for sources
in config/, thus it fells more clean moving it to config/, too.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1357>
2024-04-23 01:46:24 +00:00
Enrico Weigelt, metux IT consult 140b75298a include: colormap.h: move internal typedef to dix/colormap_priv.h
Moving the internal EntryType typedef from "colormap.h" into newly added
internal-only header "dix/colormap_priv.h"

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1283>
2024-04-23 01:05:06 +00:00
Enrico Weigelt, metux IT consult 86d0f6dafa include: drop obsolete check for typeof operator
It really seems that compilers on all our supported platforms
(including Solaris) supporting `typeof`, so we can always use it
and drop hacks with undefind behaviour entirely.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1432>
2024-04-22 22:15:45 +00:00
Enrico Weigelt, metux IT consult d2d3f4a700 os: define SECURE_RPC locally instead of global config header
Since this define is only used inside os subdir, move the definition there
and out of the global config header. This also makes some further steps,
e.g. checking whether it's supported, a litle bit easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1441>
2024-04-17 23:38:25 +00:00
Enrico Weigelt, metux IT consult c17c527b9a os: unexport ForceClockId()
This function is only intended for DDX'es (currently just Xwayland) that
need to force using another clock. Really shouldn't be called by drivers
or extensions.

Fixes: a779fda224
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1333>
2024-04-17 16:20:54 -07:00
Enrico Weigelt, metux IT consult a0b69624f7 os: unexport ListenToAllClients()
It's just called by DIX, not by any drivers/modules, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1387>
2024-04-16 18:23:27 -07:00
Enrico Weigelt, metux IT consult d18ef33099 os: unexport OnlyListenToOneClient()
Not used by any drivers, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1385>
2024-04-16 18:13:11 -07:00
Enrico Weigelt, metux IT consult 4c1795701c os: unexport MakeClientGrabPervious() and MakeClientGrabImpervious()
Not used by any drivers, so no need to export them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1384>
2024-04-16 17:52:14 -07:00
Enrico Weigelt, metux IT consult be4c8444eb os: unexport Os*() functions
These aren't called (and suited for being called) by drivers,
thus drop them from the public module API.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1381>
2024-04-16 14:20:30 +02:00
Enrico Weigelt, metux IT consult 85d4bd0dba rename remaining RT_* defines to X11_RESTYPE_*
Since we already had to rename some of them, in order to fix name clashes
on win32, it's now time to rename all the remaining ones.

The old ones are still present as define's to the new ones, just for
backwards compatibility.

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 19:00:47 -07: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 f789dca4e9 dix: move closestr.h into dix directory
It's only used by dix internally (actually just dixfonts.c - since at
least 25 years now), thus no need to keep it in global include directory.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1388>
2024-04-16 01:42:39 +00:00
Enrico Weigelt, metux IT consult d444cd4237 dix: unexport some lookup functions
These aren't used by any drivers, so no need to export them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1380>
2024-04-15 18:11:57 -07:00
Enrico Weigelt, metux IT consult dfdde27990 dix: unexport InitClient()
Not used by any driver, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1379>
2024-04-16 00:53:28 +00:00
Enrico Weigelt, metux IT consult b064b79132 dix: unexport DeleteWindowFromAnySaveSet()
Not used by any drivers, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1378>
2024-04-15 17:05:41 -07:00
Enrico Weigelt, metux IT consult 76d01e9bf6 os: unexport OsVendorVErrorFProc pointer
This pointer allows a DDX to install it's own error print handler. It's really
only intended for DDXes, thus no need to have it exported to modules.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1369>
2024-04-15 23:59:38 +00:00
Enrico Weigelt, metux IT consult 1205f5b6f9 dix: unexport GetCurrentClient()
Not used by any driver, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1377>
2024-04-15 23:47:47 +00:00
Enrico Weigelt, metux IT consult ad7e7d9259 dix: unexport CompareISOLatin1Lowered() and make it static
This function isn't used by any drivers, so no need to export it.

Also has just one consumer, so move it there and make it static.
(and also move ISOLatin1ToLower() along with it)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1374>
2024-04-15 23:34:58 +00:00
Enrico Weigelt, metux IT consult 6cb599f59c os: unexport OsLookupColor()
It's an internal function, only used by DIX, not by drivers and shouldn't
have been exported in the first place.

Fixes: 49f77fff14
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1373>
2024-04-15 16:19:06 -07:00
Enrico Weigelt, metux IT consult 2b7a2f8ed2 dix: unexport SetClipRects()
Not used by any driver, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1365>
2024-04-15 23:10:31 +00:00
Enrico Weigelt, metux IT consult 9a8e6c5bfd dix: unexport VerifyRectOrder
Not used by any driver, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1365>
2024-04-15 23:10:31 +00:00
Enrico Weigelt, metux IT consult 407fe60483 dix: unexport SetDashes
Not used by any driver, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1365>
2024-04-15 23:10:31 +00:00
Enrico Weigelt, metux IT consult 30670e72c7 dix: unexport FreeDefaultStipple()
Not used by any driver, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1365>
2024-04-15 23:10:31 +00:00
Enrico Weigelt, metux IT consult f6af379928 dix: unexport CreateDefaultStipple()
Not used by any driver, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1365>
2024-04-15 23:10:31 +00:00
Enrico Weigelt, metux IT consult bdf8ae3fc1 dix: unexport CreateGCperDepth()
Not used by any driver, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1365>
2024-04-15 23:10:31 +00:00
Enrico Weigelt, metux IT consult fc1a7363eb dix: unexport FreeGCperDepth()
Not used by any driver, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1365>
2024-04-15 23:10:31 +00:00
Enrico Weigelt, metux IT consult 32512c579e dix: unexport FreeGC()
Not used by any driver, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1365>
2024-04-15 23:10:31 +00:00
Enrico Weigelt, metux IT consult 7e30f2c8e1 dix: unexport CopyGC()
Not used by any driver, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1365>
2024-04-15 23:10:31 +00:00
Enrico Weigelt, metux IT consult 6896396456 dix: unexport CreateGC()
Not used by any drivers, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1365>
2024-04-15 23:10:31 +00:00
Enrico Weigelt, metux IT consult 46c0ac8c70 dix: unexport ChangeGCXIDs()
Move non-exported gc functions to private header
No need to clutter public headers with non-exported stuff.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1365>
2024-04-15 23:10:31 +00:00
Enrico Weigelt, metux IT consult 3b7a63e6ae os: unexport xthread_sigmask
This function isn't used by drivers and there's currently no need to do so,
thus keep it out of the public module API.

Fixes: 30ac756798
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1368>
2024-04-15 22:49:02 +00:00
Enrico Weigelt, metux IT consult 62d3114ab9 include: gc.h: drop unused defines
These seem to be unused for *long* time - couldn't even trace it back in
git history. Also not used by any known driver. Time to get rid of them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1364>
2024-04-15 22:36:06 +00:00
Enrico Weigelt, metux IT consult cf5fab0bbe os: unexport AccessUsingXdmcp()
This function is only used internally for xdmcp auth handling, not used
in modules/drivers, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1344>
2024-04-15 14:55:22 -07:00
Enrico Weigelt, metux IT consult dd21a80219 os: unexport ChangeAccessControl()
this function isn't used by modules/drivers, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1344>
2024-04-15 14:55:22 -07:00
Enrico Weigelt, metux IT consult 3f00c1b6cf os: unexport host control functions
these aren't used by modules/drivers, so no need to export them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1344>
2024-04-15 14:55:22 -07:00
Enrico Weigelt, metux IT consult 5a9b885118 os: unexport authorization management functions
Those aren't used by modules, thus no need to export them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1344>
2024-04-15 14:55:22 -07:00
Enrico Weigelt, metux IT consult bed778ee60 os: unexport LocalAccessScopeUser()
this function is only used by wayland ddx, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1344>
2024-04-15 14:55:22 -07:00
Enrico Weigelt, metux IT consult e621081fa3 os: unexport EnableLocalUser() and DisableLocalUser()
these aren't used by module, so no need to export them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1344>
2024-04-15 14:55:22 -07:00
Enrico Weigelt, metux IT consult 54441ff98a os: unexport EnableLocalAccess() and DisableLocalAccess()
these aren't used by modules, so no need to export them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1344>
2024-04-15 14:44:36 -07:00
Enrico Weigelt, metux IT consult b00fdd482c os: unexport EnableLocalHost() and DisableLocalHost()
These aren't used by modules, so no need to export them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1344>
2024-04-15 14:44:36 -07:00
Enrico Weigelt, metux IT consult 5f19eab1ee os: unexport local client creds handling
these functions aren't used by modules, so no need to export them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1344>
2024-04-15 14:44:34 -07:00
Enrico Weigelt, metux IT consult cbc9f557e5 os: unexport set_font_authorizations()
This function is only used by DIX, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1344>
2024-04-15 14:42:45 -07:00
Enrico Weigelt, metux IT consult 389b528203 os: unexport command line args handling functions
These functions shouldn't be called by drivers or extensions, thus
shouldn't be exported. Also moving it to separate header, so the
already huge ones aren't cluttered with even more things.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1334>
2024-04-15 21:21:40 +00:00
Enrico Weigelt, metux IT consult dae76bbaaf include: move busfault.h out of public include dir
this header is isn't public, so it's more appropriate, where the actual
code is, which is the os/ directory.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1337>
2024-04-15 21:10:15 +00:00
Enrico Weigelt, metux IT consult 3843a643e0 os: unexport audit functions
These aren't used by any drivers, so no need to keep them around in the
public driver API.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1326>
2024-04-15 19:54:34 +00:00
Enrico Weigelt, metux IT consult beb073813e xkb: drop ununsed XkbNameMatchesPattern()
Not used anywhere, also not in drivers, so we can drop it.
Probably never been used, just added accidentially back in 2008.

Fixes: 68bd7ac193
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1477>
2024-04-09 06:56:20 +00:00
Enrico Weigelt, metux IT consult 992aba3cb7 include: xkbstr.h: fix missing include of Xdefs.h
xkbstr.h uses types from Xdefs.h (eg. Bool) but doesn't include it.
If somebody includes it, w/o including Xdefs.h first, compile breaks:

../include/xkbstr.h:84:5: error: unknown type name ‘Bool’
   84 |     Bool active;
      |     ^~~~
../include/xkbstr.h:517:5: error: unknown type name ‘Bool’
  517 |     Bool num_groups_changed;
      |     ^~~~
../include/xkbstr.h:608:5: error: unknown type name ‘Bool’
  608 |     Bool has_own_state;
      |     ^~~~

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1474>
2024-04-09 06:50:20 +00:00
Enrico Weigelt, metux IT consult fdea36708c xkb: drop never used XkmProbe()
This function was (accidentally ?) added back in 2008, but never used.

Fixes: 68bd7ac193
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1472>
2024-04-09 06:35:05 +00:00
Erik Kurzinger ac0bc0b3b6 Present: add PresentCapabilitySyncobj and PresentPixmapSynced
Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967>
2024-04-09 06:11:03 +00:00
Erik Kurzinger 613dcb6a77 DRI3: add DRI3ImportSyncobj and DRI3FreeSyncobj
Adds the required infrastructure in the core DRI3 code to support
importing DRM synchronization objects from clients. This includes
support for the two new protocol requests from DRI3 version 1.4, an
internal representation of these objects in the form of the dri3_syncobj
structure, and an import_syncobj screen info callback.

The following operations are defined for dri3_syncobj objects
* free - release any server-side resources associated with the object
* has_fence - check if the fence for a timeline point is submitted
* is_signaled - check if a timeline point is signaled
* export_fence - return a sync fd corresponding to a timeline point
* import_fence - submit a sync fd as the fence for a timeline point
* signal - immediately signal a timeline point
* submitted_eventfd and signaled_eventfd - register an eventfd to be
  signaled when the given timeline point is either submitted or
  signaled

Implementations will be responsible for populating these function
pointers when importing a syncobj.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967>
2024-04-09 06:11:03 +00:00
Erik Kurzinger f051a2449d DRI3: provide stub implementation of DRI3SetDRMDeviceInUse
DRI3 version 1.3 introduced a new request which allows clients to
provide a hint to the server about which DRM device they are using, so
that the server might return DRM format modifiers specific to that
device. However, implementing such functionality, for Xwayland in
particular, will require fairly significant architectural changes.

To avoid blocking future versions of the DRI3 extension, we provide here
a stub implementation for the request in question. The spec explicitly
states that it is only a hint that the server is free to ignore, so
strictly speaking this implementation is still correct.

Signed-off-by: Erik Kurzinger <ekurzinger@nvidia.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/967>
2024-04-09 06:11:03 +00:00
Enrico Weigelt, metux IT consult c5e88238f2 xkb: drop unused defines
These aren't used anywhere, neither in Xserver nor drivers,
for about 11 years now. Fallout of removing component listing support.

Fixes: 710065da37
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1458>
2024-04-08 03:44:42 +00:00
Enrico Weigelt, metux IT consult 95faea8880 xkb: make XkbUpdateKeyTypesFromCore() static
This function is only used inside the same .c file where it's defined,
no outside users, also not in drivers. Thus no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1468>
2024-04-03 19:54:51 +02:00
Enrico Weigelt, metux IT consult 272e2915fe config: fix wscons backend on NetBSD
Compiler gives warning:

    ../config/wscons.c: At top level:
    ../config/wscons.c:262:1: warning: no previous prototype for ‘config_wscons_init’ [-Wmissing-prototypes]
      262 | config_wscons_init(void)
          | ^~~~~~~~~~~~~~~~~~
    ../config/wscons.c:270:1: warning: no previous prototype for ‘config_wscons_fini’ [-Wmissing-prototypes]
      270 | config_wscons_fini(void)
          | ^~~~~~~~~~~~~~~~~~

Problem is: commit bcee84c3e4 wanted to enable
wscons support on NetBSD, but only added compiling config/wscons.c, but didn't
enable setting the CONFIG_WSCONS symbol, so it won't be called at all.

Fixes: bcee84c3e4
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1450>
2024-04-02 09:50:56 +02:00
Enrico Weigelt, metux IT consult a57b449485 include: unpexport SELINUX_* consts from include/global.h
globals.h shouldn't be cluttered with extension specific things, that
aren't even used by external modules/drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1328>
2024-03-25 19:40:04 +00:00
Enrico Weigelt, metux IT consult 2003adfd33 xwin: consolidate debugging symbols
We've got three #define's that are all set at once, on enable_debugging.

A comment in meson.build already asks for consolidating them into one,
so just do it now.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1409>
2024-03-19 02:05:35 +00:00
Enrico Weigelt, metux IT consult afaad1b847 include: add comment on _XSERVER64 define
Since the whole 32/64 bit issue is a bit complex, it's worth adding some
comment on what the _XSERVER64 symbol really is needed for.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1413>
2024-03-18 23:24:36 +00:00
Olivier Fourdan 701284f057 xwayland/glamor: Drop the EGLStream backend
Now that the NVIDIA proprietary driver has grown support for GBM, the
EGLStream backend for NVIDIA GPUs is now superseded by the standard
GBM backend in Xwayland.

This code path is therefore not used and hardly ever tested.

Remove support for EGLStream in Xwayland.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1386>
2024-03-18 15:41:17 +00:00
Enrico Weigelt, metux IT consult b335a0fa20 dix: unexport CloseDownClient()
This function isn't used by drivers, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1383>
2024-03-13 00:47:36 +00:00
Enrico Weigelt, metux IT consult d84fd3bf19 dix: drop now obsolete cursorScreenDevPriv
Since the two DDX'es which had used this key (xnest and xfree86) now using
their own ones, this global key is obsolete and can be removed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1342>
2024-03-12 15:24:35 +00:00
Enrico Weigelt, metux IT consult 7f13fc7d2f dix: unexport callback manager init / teardown functions
Those are only needed inside DIX, thus no need to export them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1346>
2024-03-12 15:18:17 +00:00
Enrico Weigelt, metux IT consult 8f2894c4d0 include: unexport xserver_poll.h
It doesn't seem to have any exported functions, so doesn't need to be
exported to the public module API.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1352>
2024-03-12 15:01:35 +00:00
Enrico Weigelt, metux IT consult 738edd3501 dix: unexport eventconvert.h functions
This header isn't installed, so no external modules could use the
functions declared there. Thus we can unexport it all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1358>
2024-03-11 12:26:44 +01:00
Enrico Weigelt, metux IT consult 2a5e754275 dix: unexport SetAccelerationProfile()
Not used by any module, just locally within one source file, thus
unexport and make it static

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1347>
2024-03-09 18:01:52 +00:00
Enrico Weigelt, metux IT consult 1b983d7e82 dix: unexport FreeVelocityData()
Only used within one source, not used by external modules, thus unexport
and make it static.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1347>
2024-03-09 18:01:52 +00:00
Enrico Weigelt, metux IT consult 9d3766080b dix: unexport BasicComputeAcceleration()
only used locally within one source file, so unexport and make it static.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1347>
2024-03-09 18:01:52 +00:00
Enrico Weigelt, metux IT consult a09f2540d2 dix: unexport ProcessVelocityData2D()
Only used with on source file, so unexport and make it static.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1347>
2024-03-09 18:01:52 +00:00
Enrico Weigelt, metux IT consult b598727f1c dix: unexport InitTrackers()
Not used by any modules, thus no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1347>
2024-03-09 18:01:52 +00:00
Enrico Weigelt, metux IT consult 4db1f3f760 dix: unexport InitVelocityData()
Not used by any modules, not even outside the source file, thus
no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1347>
2024-03-09 18:01:52 +00:00
Enrico Weigelt, metux IT consult a3ebe4fa41 dix: move non-exported ptrveloc functions to separate header
unclutter ptrveloc.h by moving non-exported declarations into their own
private header file.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1347>
2024-03-09 18:01:52 +00:00
Enrico Weigelt, metux IT consult c66eaf431c include: dont install glx_extinit.h
This header isn't included by any (known) driver/module and doesn't export
any functions, thus no need to install it anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1361>
2024-03-09 17:57:25 +00:00
Enrico Weigelt, metux IT consult 02ba47f09d os: move out Format*() functions
Move out the Format*() functions to separate source and header.

These aren't exported, thus no module API change.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1312>
2024-03-09 17:34:51 +00:00
Enrico Weigelt, metux IT consult 040e41c7e9 dix: unexport global variables
Those aren't used by drivers, so no need to export them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1375>
2024-03-09 17:23:43 +00:00
Enrico Weigelt, metux IT consult 30b403b0f0 os: unexport Fopen(), Fclose(), Popen(), Pclose(), System()
These functions are just used for reading auth file or calling xkbcomp while
dropping privileges, in case the Xserver is started as unprivileged user
with suid-root. Thus, shouldn't be used (and aren't used) by drivers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1370>
2024-03-09 17:18:46 +00:00
Enrico Weigelt, metux IT consult 15d3c1a6f1 os: move os_move_fd() out of public API
This function isn't used by any driver and doesn't seem to be useful for them,
thus move it out of the public module API, in order to tidy it up a bit.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1366>
2024-03-09 17:12:46 +00:00
Enrico Weigelt, metux IT consult 934b771f7a os: unexport AutoResetServer()
This is an internal function, not used and not supposed to be used by
any drivers, so shouldn't have been exported in the first place.

Fixes: 49f77fff14
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1372>
2024-03-07 23:10:17 +00:00
Enrico Weigelt, metux IT consult b1ce5543f1 dix: unexport workqueue functions
These aren't used by drivers, so no need to export them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1376>
2024-03-07 22:57:53 +00:00
Enrico Weigelt, metux IT consult 53a0442b87 drop remains of DMX
DMX has long gone, but there's still some fallout from it's removal
yet to be cleaned up.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1362>
2024-03-05 16:57:52 +01:00
Enrico Weigelt, metux IT consult 6999bc49d3 dix: unexport AttachOffloadGPU() and DetachOffloadGPU()
These aren't externally used, thus no need to export them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1349>
2024-03-03 23:24:29 +00:00
Enrico Weigelt, metux IT consult 1277bb7143 dix: unexport AttachOutputGPU() and DetachOutputGPU()
These aren't externally used, thus no need to export them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1349>
2024-03-03 23:24:28 +00:00
Enrico Weigelt, metux IT consult 71b81a7473 dix: unexport AttachUnboundGPU() and DetachUnboundGPU()
These aren't externally used, thus no need to export them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1349>
2024-03-03 23:24:28 +00:00
Enrico Weigelt, metux IT consult 55dc4a8bdc dix: unexport RemoveGPUScreen()
This function isn't used by any modules/drivers, so no need to export it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1349>
2024-03-03 23:24:28 +00:00
Enrico Weigelt, metux IT consult 27b83c4cd0 dix: unexport AddScreen() and AddGPUScreen()
These aren't used by any drivers/modules, just DDX'es, so no need to export.

Note: tigervnc does use it, but it has it's own DDX, therefore directly
linked in, just like the in-tree DDX'es which doesn't need exporting.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1349>
2024-03-03 23:24:28 +00:00
Enrico Weigelt, metux IT consult dc84331f5d include: drop obsolete registry.h
Now that there's no actual consumer of it left, it can be dropped.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1348>
2024-03-03 23:20:06 +00:00
Enrico Weigelt, metux IT consult 17ad53c803 include: unexport registry.h
This file isn't included by any known modules, so no need to keep it
around in the public api.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1348>
2024-03-03 23:20:06 +00:00
Enrico Weigelt, metux IT consult 5f5d55be88 dix: unexport XREGISTRY_UNKNOWN define
It's not used by external modules, thus no need to have it in the
public API.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1348>
2024-03-03 23:20:06 +00:00
Enrico Weigelt, metux IT consult 4ebb02cdda dix: unexport extension registry functions
These aren't used by (known) external modules, thus no need to export them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1348>
2024-03-03 23:20:06 +00:00
Enrico Weigelt, metux IT consult 1f5ab6ec28 dix: unexport RegisterResourceName() and LookupResourceName()
These aren't used by external modules, thus no need to export them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1348>
2024-03-03 23:20:06 +00:00
Enrico Weigelt, metux IT consult 36e2cf64c8 dix: unexport registry setup/teardown functions
these aren't to be called by modules, thus no need to export them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1348>
2024-03-03 23:20:06 +00:00
Enrico Weigelt, metux IT consult c3255fbc1c os: drop unneeded DDXOSVERRORF conditional
This conditional practically only controls whether we have an pointer,
where DDX can plug in it's own VErrorF() handler (currently only xwin
doing that). The cost of having it even when DDX doesn't use it, is
really negligible: it's just one pointer and an extra non-null check
on it per VErrorF() call - a very cold path. Strangely, xwin has extra

Getting rid of this unnecessary complexity that really hasn't any
practical gain.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1329>
2024-03-03 23:15:14 +00:00
Enrico Weigelt, metux IT consult 40c5d39c55 include: move xsha1.h to os/
This header is never exported and belongs to OS layer, thus no need to have it
in include/ directory, where all the public ones are - better off under os/.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1350>
2024-03-03 23:11:05 +00:00
Enrico Weigelt, metux IT consult ebabca56a4 consolidate MITSHM and HAS_SHM symbols
Both symbols are set on exactly the same condition (build_mitshm),
so can be consolidated into one: MITSHM

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1296>
2024-03-03 23:07:18 +00:00
Enrico Weigelt, metux IT consult 5d2f675ca8 os: utils: drop obsolete System() on non-win32 targets
This function is only used on WIN32 targets, so we can drop the *nix
implementation.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1295>
2024-03-03 23:02:54 +00:00
Enrico Weigelt, metux IT consult 5b2c00d38a include: drop closestr.h from public module API
None of the public module API functions use the types defined in here,
this file isn't even included anywhere (in the public headers). Thus it
doesn't seem to be needed in the public API at all - so make it private.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1281>
2024-03-03 22:46:34 +00:00
Enrico Weigelt, metux IT consult cb7de89214 include: drop unused including of closure.h
The headers dixfont.h and dixfontstr.h include closure.h, but don't use
any definitions from it, thus the include statements can be dropped.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1280>
2024-03-03 22:42:41 +00:00
Enrico Weigelt, metux IT consult ceb60b0cda os: unexport TimerInit() and TimerForce()
These functions aren't used by and drivers (and TimerInit() shouldn't be
be called from modules at all), thus unexport them.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1330>
2024-02-29 01:20:57 +00:00
Enrico Weigelt, metux IT consult 0f37f6fb4c os: drop unused GetAccessControl()
This function isn't used anywhere, not even in (known) modules/drivers.
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/1343>
2024-02-29 01:15:45 +00:00
Enrico Weigelt, metux IT consult fe1e2b7b3d dix: unexport and move maxBigRequestSize
* this symbol is a server configuration flag (can be passed via cmdline)
  for limiting the max size of big-requests. there shouldn't be any need
  to use it outside the core X server (in server modules like drivers
  or external extension) - therefore unexport it
* in order to reduce namespace pollution of public (server module API)
  headers, create a new internal header for those tings (more to come)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1275>
2024-02-23 23:19:32 +00:00
Enrico Weigelt, metux IT consult eed0697ec9 os: consolidate busfault handling
The symbols HAVE_SIGACTION and BUSFAULT are set under the same conditions,
so can be consolidated into one. Also define dummies when HAVE_SIGACTION
is not set, so a few #ifdef's less clutterig the code.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1297>
2024-02-23 23:15:12 +00:00
Peter Hutterer eaa92ea422 Revert "include: move BUG_*() macros to separate header"
This breaks the xf86-input-synaptics driver:

  synaptics.c: In function 'clickpad_guess_clickfingers':
  synaptics.c:2638:5: error: implicit declaration of function 'BUG_RETURN_VAL' [-Werror=implicit-function-declaration]
   2638 |     BUG_RETURN_VAL(hw->num_mt_mask > sizeof(close_point) * 8, 0);

This reverts commit 442aec2219.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1316>
2024-02-23 23:11:01 +00:00
Enrico Weigelt, metux IT consult 834acc88fb factor out X_REGISTRY_RESOURCE and X_REGISTRY_REQUEST to meson.build
there are several feautures depending on LookupResourceName() et al,
so set these symbole inside meson.build, instead of #define'ing them
conditionally in registry.h

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1262>
2024-02-23 23:02:00 +00:00
Enrico Weigelt, metux IT consult 84a196e707 dix: unexport party_like_its_1989 (retro mode)
The retro mode is still used, so keep it. But the flag variable really
doesn't need to be part of public API.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1273>
2024-02-23 00:05:49 +00:00
Enrico Weigelt, metux IT consult fdf483d862 include: os: fix return value of OsLookupColor()
The actual implementation uses Bool, but forward declaration is int.
For the compiler it's practically the same, but for the programmer these
have different semantics.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1313>
2024-02-22 23:33:34 +00:00
Enrico Weigelt, metux IT consult 6dafe3dbe6 drop remains of support for old Sun compilers
With transition from autoconf to meson, these aren't actually supported
anymore, and re-adding it isn't planned. Thus the now dead code pathes
can be completely removed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1286>
2024-02-19 09:21:36 +00:00
Enrico Weigelt, metux IT consult 8d2117abeb hw: xwayland: fix build if neither gbm nor eglstream available
glamor needs to be disabled if neither gbm nor eglstream is available,
otherwise build breaks.

Closes: xorg/xserver#1631
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-19 00:53:30 +00:00
Matthieu Herrb 238f8edcaf xfree86/bsd: fix build on NetBSD/amd64.
The IOPL function for 64 bit systems is x86_64_iopl() there
2024-02-18 00:03:45 +00:00
Enrico Weigelt 442aec2219 include: move BUG_*() macros to separate header
Yet another step of uncluttering includes: move out the BUG_* macros
into a separate header, which then is included as-needed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2024-02-15 23:33:46 +00:00
Peter Hutterer de0031eefd dix: initialize the XTest sendEventsProc for all devices
XTest requests lets the client specify a device ID, only if none
is specified do we fall back to the XTEST special device.
As of commit
  aa4074251 input: Add new hook DeviceSendEventsProc for XTEST
regular devices are no longer able to send XTest events because they
have no sendEventsProc set.

This caused issue #1574 and the crash was fixed with commit
  e820030de xtest: Check whether there is a sendEventsProc to call
but we still cannot send XTest events through a specific device.

Fix this by defaulting every device to the XTest send function and
punting it to the DDX (i.e. Xwayland) to override the devices as
necessary.

Fixes e820030de2
Fixes aa4074251f
2024-01-09 00:45:31 +00:00
Peter Hutterer 2cee5fb36c test: fix various leaks in the tests 2024-01-09 09:49:54 +10:00
Olivier Fourdan 7fdef970c4 build: Switch to meson 0.56
And replace the deprecated meson API accordingly.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2024-01-08 10:38:05 +00:00
Sam James 515b240a24 meson: add option for systemd_notify
Without this, systemd will be used if installed on the system automagically,
which is a problem if the built e.g. Xwayland is going to be used on a non-systemd
machine.

Bug: https://bugs.gentoo.org/908254
Signed-off-by: Sam James <sam@gentoo.org>
2024-01-08 01:23:55 +00:00
Chia-Lin Kao (AceLan) f59871587e hw/xfree86: re-calculate the clock and refresh rate
xserver fails to generate useable resolutions with 90Hz framerate
panels(encounter the same issue with 3 different 2.5k resolution
panels). All the resolutions shown by xrandr lead to blank screen except
the one written in EDID.
Ville Syrjälä from Intel provides a method to calculate the preferred
clock and refresh rate from the existing resolution table and this
works for the issue.

v2. xf86ModeVRefresh might return 0, need to check it before use it.
v3. reported by Markus on launchpad that the issue is not devided by 0,
it's the "preferred" being accessed unconditionally.
BugLink: https://launchpad.net/bugs/1999852

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1388
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao@canonical.com>
2023-12-22 05:02:05 +00:00
Alexander Volkov 62fec48a6b dpms: Add support for DPMSInfoNotify event from DPMS 1.2 (xorgproto)
This allows applications to respond to changes of power level
of a monitor, e.g. an application may stop rendering and related
calculations when the monitor is off.

Related bug: https://bugs.freedesktop.org/57120

Signed-off-by: Alexander Volkov <avolkov@astralinux.ru>
2023-12-18 16:35:51 +03:00
Jan Beich 58e8c967b6 os: Use LOCAL_PEERCRED to determine local client PID on FreeBSD
LOCAL_PEERCRED is similar to SO_PEERCRED but takes SOL_LOCAL. On DragonFly
cr_pid isn't supported yet, so fall back to getpeereid().

Based on https://gitlab.freedesktop.org/wayland/wayland/-/commit/54b237a61257
2023-12-17 17:07:16 +00:00
Peter Hutterer 45009fb7f5 dix: clean up the GestureInfoRec on device close
Direct leak of 1080 byte(s) in 3 object(s) allocated from:
    #0 0x7f00a4ed8cc7 in calloc (/lib64/libasan.so.8+0xd8cc7) (BuildId: 6f17f87dc4c1aa9f9dde7c4856604c3a25ba4872)
    #1 0x59f740 in InitGestureClassDeviceStruct ../dix/devices.c:1692
    #2 0x418a0b in xwl_pointer_proc_pointer_gestures ../hw/xwayland/xwayland-input.c:325
    #3 0x598e5c in ActivateDevice ../dix/devices.c:578
    #4 0x420207 in init_pointer_gestures_device ../hw/xwayland/xwayland-input.c:1677
    #5 0x420bf1 in seat_handle_capabilities ../hw/xwayland/xwayland-input.c:1801
    #6 0x7f00a4145055 in ffi_call_unix64 (/lib64/libffi.so.8+0x9055) (BuildId: 308041eea4a8d89d9265d3c24b7261dfbe44a61e)

Acked-by: Olivier Fourdan <ofourdan@redhat.com>
2023-12-05 14:21:28 +10:00
Yuriy Vasilev c170056111 glamor: xv: add rgb565
This commit adds RGB565 format to XVideo with reuse of RGBA32 shader

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Yuriy Vasilev <uuvasiliev@yandex.ru>
2023-11-29 21:18:29 +00:00
Yuriy Vasilev 15412e78c8 glamor: xv: add rgba32 format
This commit adds RGBA32 format to XVideo along with shader for handling it.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Yuriy Vasilev <uuvasiliev@yandex.ru>
2023-11-29 21:18:29 +00:00
Peter Hutterer 564ccf2ce9 mi: reset the PointerWindows reference on screen switch
PointerWindows[] keeps a reference to the last window our sprite
entered - changes are usually handled by CheckMotion().

If we switch between screens via XWarpPointer our
dev->spriteInfo->sprite->win is set to the new screen's root window.
If there's another window at the cursor location CheckMotion() will
trigger the right enter/leave events later. If there is not, it skips
that process and we never trigger LeaveWindow() - PointerWindows[] for
the device still refers to the previous window.

If that window is destroyed we have a dangling reference that will
eventually cause a use-after-free bug when checking the window hierarchy
later.

To trigger this, we require:
- two protocol screens
- XWarpPointer to the other screen's root window
- XDestroyWindow before entering any other window

This is a niche bug so we hack around it by making sure we reset the
PointerWindows[] entry so we cannot have a dangling pointer. This
doesn't handle Enter/Leave events correctly but the previous code didn't
either.

CVE-2023-5380, ZDI-CAN-21608

This vulnerability was discovered by:
Sri working with Trend Micro Zero Day Initiative

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2023-10-25 00:37:47 +00:00
John Kennedy 997e17eabe Enable USE_DEV_IO on FreeBSD/aarch64 2023-10-22 16:08:21 +00:00
Sam James 94945a5274 Switch to libbsd-overlay
This is more portable than libbsd as everything Just Works, even on BSD systems,
and is the recommended method of consuming libbsd nowadays.

It also helpfully lets things work with glibc-provided functions for new
enough glibc.

Closes: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/973
Co-authored-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Sam James <sam@gentoo.org>
2023-08-16 19:56:50 +00:00
Peter Hutterer a133334270 xwayland: Add XTEST support using EIS
This adds support for XTEST in Xwayland using EIS, the emulated input
library [1].

To differentiate between X11 clients using XTEST, initiate a EI context
for each client and use the actual client name, from its command
line.

When an X11 client first tries to use XTEST to generate emulated input
events, a new connection to libEI is initiated by Xwayland on behalf
of the X11 client.

During that connection phase, the EI server will not be accepting
events until the emulated device is actually created, meaning that any
XTEST request from the X11 client will be discarded until the EI server
is willing to accept events.

To avoid that issue, add an event queue in Xwayland per X11 client that
will keep those requests, and dequeue them as soon as the EI server is
ready, i.e. once the EI device is added.

If the X11 client disconnects from the Xserver before the EI server is
ready, or if the connection is closed by the EI server, those events are
discarded and the queue cleared from any pending events.

For 10 minutes after the client disconnects, keep the internal struct
alive. If a client with the same commandline arguments connects again,
re-use the same struct. This means we are faster with the events the
second time around but it also allows the EIS server to pause individual
clients that keep sending intermittent events and disconnect immediately
(e.g. it'd be possible to pause xdtotool while an authentication prompt
is active).

[1] https://gitlab.freedesktop.org/libinput/libei

Thanks to Jan Beich <jbeich@FreeBSD.org> for fixing the build on BSD.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Co-authored-by: Olivier Fourdan <ofourdan@redhat.com>
Co-authored-by: David Redondo <kde@david-redondo.de>
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2023-06-26 13:19:19 +02:00
Olivier Fourdan aa4074251f input: Add new hook DeviceSendEventsProc for XTEST
For Xwayland, we need to be able to send the events that would normally
be processed by the normal Xserver event processing to be forwarded to
the Wayland compositor (somehow).

Add a new hook “DeviceSendEventsProc” attached to the device so that
Xwayland can implement its own routine instead of the “normal” XTEST
implementation which generates and processes X input events.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2023-06-26 13:19:19 +02:00
Simon Ser 636c9aa359 build: set _GNU_SOURCE when checking for SO_PEERCRED
SO_PEERCRED is not POSIX, so might be hidden unless _GNU_SOURCE
is defined.

See [1]: cc.has_header_symbol() does not inherit the project
arguments.

[1]: https://github.com/mesonbuild/meson/issues/3301

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-04-14 14:59:05 +00:00
Simon Ser f31ca9238f xwayland: use gbm_bo_create_with_modifiers2()
This allows us to pass flags to the function, avoiding the forced
implicit GBM_BO_USE_SCANOUT which happens with the older version.

Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
2023-04-12 10:44:25 +02:00
Simon Ser 21b3dad238 Allow disabling the SHAPE extension at runtime
To correctly render a window making use of SHAPE, a compositor
must query the shape rectangles. This may not be a desirable
feature for a Wayland compositor. Allow SHAPE to be turned off at
runtime, so that the compositor can opt-out.

Signed-off-by: Simon Ser <contact@emersion.fr>
2023-03-03 18:28:40 +00:00
Alan Coopersmith d6b20f5e36 Remove "All rights reserved" from Oracle copyright notices
Oracle no longer includes this term in our copyright & license notices.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2023-02-25 09:40:41 -08:00
Yao Wei 7ce57e179b dix: Force update LEDs after device state update in EnableDevice
This is to make sure the hardware gets the device states regardless
whether the internal state has changed or not, to overcome situations
that device LEDs are out of sync e.g. switching between VTs.

Signed-off-by: Yao Wei (魏銘廷) <yao.wei@canonical.com>
2023-02-21 03:43:05 +00:00
Olivier Fourdan 2f8778ca68 xwayland: wl_pointer.axis_v120 is no longer optional
With Wayland 1.21 being our baseline, we do not need to compile
wl_pointer.axis_v120 conditionally.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
2023-02-09 22:57:00 +00:00
Jeremy Huddleston Sequoia 8a4ab22873 os: Use LOCAL_PEERPID from sys/un.h if it is available to detemine the pid when falling back on getpeereids()
This provides a way to determine the pid of a peer connection on
systems like darwin that do not support getpeerucred() nor
SO_PEERCRED.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2023-01-26 17:51:16 +00:00
Jeremy Huddleston Sequoia 16e7cdba48 rootless: Use screen_x and screen_y instead of pixmap pointer hacks
This updates rootless to treat pixmaps consistently with COMPOSITE,
using the screen_x and screen_y values rather than doing hacky math.

This will allow for proper bounds checking on a given PixmapRec.

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2023-01-20 17:10:54 +00:00
Peter Hutterer 3a02f56b43 xwayland: hook up wl_pointer.axis_v120 events
For details on the protocol itself see the Wayland merge request:
https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/72

The v120 event has a value base of 120, so one wheel detent is 120, half a
wheel is 60, etc. This is the API Windows has been using since Vista but it
requires HW support from the device. Logitech mice and many Microsoft mice of
the last decade or so have support and it's enabled in the kernel since v5.0.

The new events replace wl_pointer.axis_discrete events, once you bind to
wl_pointer >= 8 you only get the v120 events. So backwards compatibility
is simple, we just multiply the discrete events if we get them and
treat everything as 120 event internally.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-01-18 13:33:54 +10:00