Commit Graph

220 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult 14dba35dac dix: unexport PickKeyboard()
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:19:15 +02:00
Enrico Weigelt, metux IT consult b592dc50db dix: unexport PickPointer()
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:19:10 +02:00
Enrico Weigelt, metux IT consult b826800613 dix: unexport OtherClientGone()
Just an internal resource destructor, not used by any external
drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:19:07 +02:00
Enrico Weigelt, metux IT consult 0124a7c370 dix: unexport and document ScreenRestructured()
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:19:04 +02:00
Enrico Weigelt, metux IT consult 2b89942c7a dix: unexport and document WindowsRestructured()
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:19:00 +02:00
Enrico Weigelt, metux IT consult 17ef760571 dix: unexport and document WindowHasNewCursor()
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:18:57 +02:00
Enrico Weigelt, metux IT consult 95f802e3f6 dix: unexport RootWindowFinalizeCallback field
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:18:54 +02:00
Enrico Weigelt, metux IT consult 20b82a6efb dix: unexport DeviceEventCallback field
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:18:50 +02:00
Enrico Weigelt, metux IT consult 1ba07d8065 dix: unexport DeliverRawEvent()
Not used by any external drivers, so no need to keep it public.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:18:46 +02:00
Enrico Weigelt, metux IT consult 472e686496 dix: unexport DeliverEventsToWindow()
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:18:43 +02:00
Enrico Weigelt, metux IT consult 5d6d3b56ad dix: unexport DeliverEvents() and fix return type
* not needed by any drivers, so no need to keep it exported
* correct return type is `enum EventDeliveryState`

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:18:40 +02:00
Enrico Weigelt, metux IT consult a20e0304fe dix: unexport TryClientEvents()
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:18:37 +02:00
Enrico Weigelt, metux IT consult 1dd10193a9 dix: unexport, document and rename GetSpriteWindow()
Not used by any drivers, so no need to keep it exported.
Also spending it for a better fitter name.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:18:32 +02:00
Enrico Weigelt, metux IT consult 32a0109615 dix: unexport, document and rename GetCurrentRootWindow()
Not used by any drivers, so no need to keep it exported.
Also spending it for a better fitter name.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:18:23 +02:00
Enrico Weigelt, metux IT consult 9e93d51e41 dix: unexport and document AlterSaveSetForClient()
Not used by any external drivers, so no need to keep it exported.
Also using XRetCode and marking paremters where NULL isn't allowed.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:18:17 +02:00
Enrico Weigelt, metux IT consult 2da45bd9ca dix: unexport and document ConfineToShape()
Not used by any drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:18:09 +02:00
Enrico Weigelt, metux IT consult a58fd6f511 (!2007) dix: unexport SendGraphicsExpose() and fix parameter types
* not used by any drivers, so no need to keep it exported
* fix parameter types to matching the protocol types

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:18:08 +02:00
Enrico Weigelt, metux IT consult a94e906084 dix: unexport SendErrorToClient() and fix parameter types
* not used by any drivers, so no need to keep it exported
* fix parameter types to matching the protocol types

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:18:05 +02:00
Enrico Weigelt, metux IT consult 689de526a4 dix: unexport and document ClientIsAsleep()
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:18:01 +02:00
Enrico Weigelt, metux IT consult 2e0cde7b56 dix: unexport and document ClientWakeup()
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:17:58 +02:00
Enrico Weigelt, metux IT consult 646c76adea dix: unexport and document ClientSignalAll()
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:17:52 +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 8104fc115d dix: unexport and document ClientSleep()
Not used by any external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:17:45 +02:00
Enrico Weigelt, metux IT consult 49107319f7 dix: unexport and document MarkClientException()
Not supposed to be used by external drivers, so no need to keep it exported.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:17:42 +02:00
Enrico Weigelt, metux IT consult 5ae5fa9671 dix: unexport and document NextAvailableClient()
Only called from OS layer, thus should not be exported at all.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-12 16:17:39 +02:00
Enrico Weigelt, metux IT consult 1fc9a26afd drop not needed includes of geext.h
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1810>
2025-02-24 20:19:55 +00:00
Enrico Weigelt, metux IT consult b61647f3a1 dix: add in-code docs for dixDestroyPixmap()
Give some more explaination for the dixDestroyPixmap() function.

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:30 +01:00
Enrico Weigelt, metux IT consult 2e0c19b6d9 dix: add getter for display name
Xrdp needs to know the current display name (for setting up it's
own server sockets accordingly). Instead of exporting an internal
field, adding a little getter for this.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1783>
2025-02-11 19:13:01 +01: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 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 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 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 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 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 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
Matthieu Herrb 5b8817a019 Convert more funcs to use InternalEvent.
This fixes a crash when a DeviceEvent struct converted to
InteralEvent was beeing copied as InternalEvent (and thus
causing out of bounds reads) in ActivateGrabNoDelivery()
in events.c: 3876    *grabinfo->sync.event = *real_event;

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

Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
2021-12-19 20:01:04 +00:00
Simon Ser 7d34b1f2b7 xwayland: add -noTouchPointerEmulation
In some scenarios, the Wayland compositor might have more knowledge
than the X11 server and may be able to perform pointer emulation for
touch events better. Add a command-line switch to allow compositors
to turn Xwayland pointer emulation off.

Signed-off-by: Simon Ser <contact@emersion.fr>
2021-09-06 21:19:46 +00:00
Roman Gilg e4dabe8d93 Remove build-only include from public header
The dix-config.h file is not installed, but dix.h is. The include makes the
compilation of external drivers fail (for example the libinput driver).

The Xserver compilation also works without the include, so just remove it.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
2021-08-07 14:26:26 +02:00
Demi Marie Obenour 5c2592cbb1 Add do-while loops to DIX macros
This ensures they will behave properly in conditionals and always
require a trailing semicolon.
2021-07-31 08:55:52 -04:00
Olivier Fourdan 6b47321bc6 dix: Add optional terminate delay
When the command line option "-terminate" is used, it could be
interesting to give it an optional grace period to let the Xserver
running for a little longer in case a new connection occurs.

This adds an optional parameter to the "-terminate" command line option
for this purpose.

v2: Use a delay in seconds instead of milliseconds
    (Martin Peres <martin.peres@mupuf.org>)
v3: Clarify man page entry, ensure terminateDelay is always >= 0,
    simplify TimerFree(). (Peter Hutterer <peter.hutterer@who-t.net>)

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-06-07 17:28:05 +02:00
Povilas Kanapickas 5163fc8bc2 Implement gesture processing logic 2021-05-30 13:26:42 +03:00
Povilas Kanapickas 22fa31ed56 dix: Add new internal event enums for gesture events 2021-05-30 13:26:30 +03:00
Povilas Kanapickas f5220117e9 dix: Extract FreezeThisEventIfNeededForSyncGrab() 2020-11-25 04:20:22 +00:00
Adam Jackson ec659f021e dix: Remove now-unused SetVendorString 2019-10-30 16:17:04 +00:00
Hans de Goede 834a467af9 dix: Add GetCurrentClient helper
Request-handlers as registered in the requestVector array, always get
passed the clientPtr for the client which sent the request.
But the implementation of many request-handlers typically consists of
a generic handler calling implementation specific callbacks and / or
various helpers often multiple levels deep and in many cases the clientPtr
does not get passed to the callbacks / helpers.

This means that in some places where we would like to have access to the
current-client, we cannot easily access it and fixing this would require
a lot of work and often would involve ABI breakage.

This commit adds a GetCurrentClient helper which can be used as a
shortcut to get access to the clienPtr for the currently being processed
request without needing a lot of refactoring and ABI breakage.

Note using this new GetCurrentClient helper is only safe for code
which only runs from the main thread, this new variable MUST NOT be used
by code which runs from signal handlers or from the input-thread.

The specific use-case which resulted in the creation of this patch is adding
support for emulation of randr / vidmode resolution changes to Xwayland.
This emulation will not actually change the monitor resolution instead it
will scale any window with a size which exactly matches the requested
resolution to fill the entire monitor. The main use-case for this is
games which are hard-coded to render at a specific resolution and have
sofar relied on randr / vidmode to change the monitor resolution when going
fullscreen.

To make this emulation as robust as possible (e.g. avoid accidentally scaling
windows from other apps) we want to make the emulated resolution a per client
state. But e.g. the RRSetCrtc function does not take a client pointer; and is
a (used) part of the Xorg server ABI (note the problem is not just limited
to RRSetCrtc).

Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2019-10-12 12:19:14 +02:00
Ray Strode 8738ce85df dix: ensure work queues are cleared on reset
If the server resets, most client workqueues are cleaned up as the
clients are killed.

The one exception is the server's client, which is exempt from
the killing spree.

If that client has a queued work procedure active, it won't get
cleared on reset.

This commit ensures it gets cleared too.
2018-11-19 19:37:10 +00:00