summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2021-09-15Drop XWayland DDXPovilas Kanapickas4-33/+0
2021-09-06xwayland: add -noTouchPointerEmulationSimon Ser1-0/+1
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-08-31Fix compilation with windows.h from latest w32apiJon Turney1-0/+1
misc.h has complex logic (checking MAXSHORT is undefined etc.) controlling if it includes assert.h or not. Including windows.h from w32api 9.0.0 now trips over that, causing assert.h to not be included, causing various errors, e.g. In file included from ../include/cursor.h:53, from ../include/dix.h:54, from ../os/osdep.h:139, from ../hw/xwin/winauth.c:40: ../include/privates.h: In function ‘dixGetPrivateAddr’: ../include/privates.h:121:5: error: implicit declaration of function ‘assert’ [-Werror=implicit-function-declaration] Fix this by IWYU in privates.h
2021-08-07Remove build-only include from public headerRoman Gilg1-1/+0
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-07-31Add do-while loops to DIX macrosDemi Marie Obenour1-51/+68
This ensures they will behave properly in conditionals and always require a trailing semicolon.
2021-07-30Mark the dixChangeWindowProperty() value argument as constAlex Richardson1-1/+1
It is copied using memcpy() and not modified so we can add const. This fixes a -Wincompatible-pointer-types-discards-qualifiers compiler warning that was failing a -Werror XVnc build for me. Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
2021-07-05meson: Fix warnings when reading back and checking feature flagsPovilas Kanapickas1-1/+10
Meson does not like comparing things of different types which is a problem when reading back values of feature flags as they may contain either false (bool) or 1 (string). Since there is a strong reason why we use false when the feature does not exist, we work around this issue by always converting the returned value to int via to_int(). Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1190 Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2021-06-07dix: Add optional terminate delayOlivier Fourdan1-0/+1
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-07xfixes: Add ClientDisconnectModeOlivier Fourdan1-1/+1
With Wayland compositors now being able to start Xwayland on demand, the next logical step is to be able to stop Xwayland when there is no more need for it. The Xserver itself is capable of terminating itself once all X11 clients are gone, yet in a typical full session, there are a number of X11 clients running continuously (e.g. the Xsettings daemon, IBus, etc.). Those always-running clients will prevent the Xserver from terminating, because the actual number of X11 clients will never drop to 0. Worse, the X11 window manager of a Wayland compositor also counts as an X11 client, hence also preventing Xwayland from stopping. Some compositors such as mutter use the XRes extension to query the X11 clients connected, match their PID with the actual executable name and compare those with a list of executables that can be ignored when deciding to kill the Xserver. But that's not just clumsy, it is also racy, because a new X11 client might initiate a connection the X11 server right when the compositor is about to kill it. To solve this issue directly at the Xserver level, this add new entries to the XFixes extension to let the X11 clients themselves specify the disconnect mode they expect. Typically, those X11 daemon clients would specify the disconnect mode XFixesClientDisconnectFlagTerminate to let the Xserver know that they should not be accounted for when checking the remaining clients prior to terminate. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-05-30Bump XI protocol version to 2.4Povilas Kanapickas1-1/+1
2021-05-30Implement gesture processing logicPovilas Kanapickas3-0/+20
2021-05-30dix: Implement gesture event submission code pathPovilas Kanapickas2-0/+28
2021-05-30dix: Implement internal gesture state handlingPovilas Kanapickas2-0/+40
2021-05-30xi: Implement conversions from internal to Xi2 gesture event structsPovilas Kanapickas1-0/+3
2021-05-30xi: Bump max supported XI2 event typePovilas Kanapickas1-1/+1
2021-05-30xi: Implement grab support for new gesture event typesPovilas Kanapickas2-5/+7
2021-05-30xi: Implement internal gesture event structPovilas Kanapickas2-0/+34
2021-05-30dix: Add new internal event enums for gesture eventsPovilas Kanapickas3-0/+16
2021-04-09meson: switch getpeer* checks to autotools styleJan Beich1-1/+1
Checking for function "getpeereid" : YES Checking for function "getpeerucred" : NO [...] include/meson.build:182:7: ERROR: Argument to "not" is not a boolean. Fixes: 68c2cfadd6d3 ("meson: Make sure defines are either set to 1 or not defined")
2021-04-09meson: check pthread_setname_np like autotoolsJan Beich1-0/+2
FreeBSD < 12.2 and OpenBSD only have pthread_set_name_np. As libpthread isn't in scope use -Werror to trip the check. Header <pthread.h> has symbol "PTHREAD_MUTEX_RECURSIVE" : YES Checking if "pthread_setname_np(tid, name)" compiles: YES os/inputthread.c:326:5: error: implicit declaration of function 'pthread_setname_np' is invalid in C99 [-Werror,-Wimplicit-function-declaration] pthread_setname_np (pthread_self(), "InputThread"); ^ os/inputthread.c:447:5: error: implicit declaration of function 'pthread_setname_np' is invalid in C99 [-Werror,-Wimplicit-function-declaration] pthread_setname_np (pthread_self(), "MainThread"); ^ Fixes: c20e7b5e2222 ("meson: Automatically detect HAVE_PTHREAD_SETNAME_NP")
2021-04-09meson: Make sure defines are either set to 1 or not definedPovilas Kanapickas1-127/+131
This will make the behavior of meson consistent with autotools. The configuration macros are exposed to public headers so any inconsistency is likely to break code for anyone who's not careful to use #ifdef instead of #if. Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2021-04-09meson: Sync the name of INPUTTHREAD conf macro with autotools buildPovilas Kanapickas1-1/+1
The rest of dix code uses INPUTTHREAD, so having a different name in meson configuration was an oversight. Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/936 Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2021-04-08meson: Drop version subpatch handlingPovilas Kanapickas1-5/+0
2021-04-08meson.build: Keep the protocol version looking like xserver 1.20.x didAdam Jackson1-1/+2
This effectively changes the versioning to be as if xserver 21.0 was xserver 1.21.0. This should keep any client-side version checks that know about the Xorg 7.0 -> xserver 1.0 epoch from getting confused.
2021-04-08meson: Fix DragonFly BSD identifier in meson build filesGeorge Matsumura1-2/+2
This changes the operating system identifier tested against host_machine.system() in meson build files from "dragonflybsd" to the officially stable "dragonfly". Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
2021-03-15meson: Make sure XKM_OUTPUT_DIR has a trailing slashMichel Dänzer1-1/+1
RunXkbComp passes an invalid file path to xkbcomp if there's no trailing slash. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1146 Suggested-by: Dylan Baker <dylan.c.baker@intel.com>
2021-03-11meson: hide C API if Xorg is disabled (like autotools)Jan Beich1-0/+1
When building only Xwayland using Meson some files are always installed. This causes package conflict if Xwayland is built separately from Xorg. include/xorg/compositeext.h include/xorg/damage.h include/xorg/damagestr.h include/xorg/dbestruct.h include/xorg/dri3.h include/xorg/fb.h include/xorg/fboverlay.h include/xorg/fbpict.h include/xorg/fbrop.h include/xorg/geext.h include/xorg/geint.h include/xorg/glyphstr.h include/xorg/mi.h include/xorg/micmap.h include/xorg/micoord.h include/xorg/migc.h include/xorg/miline.h include/xorg/mioverlay.h include/xorg/mipict.h include/xorg/mipointer.h include/xorg/mipointrst.h include/xorg/mistruct.h include/xorg/misync.h include/xorg/misyncfd.h include/xorg/misyncshm.h include/xorg/misyncstr.h include/xorg/mizerarc.h include/xorg/panoramiX.h include/xorg/panoramiXsrv.h include/xorg/picture.h include/xorg/picturestr.h include/xorg/present.h include/xorg/presentext.h include/xorg/randrstr.h include/xorg/rrtransform.h include/xorg/shadow.h include/xorg/shmint.h include/xorg/syncsdk.h include/xorg/vndserver.h include/xorg/wfbrename.h include/xorg/xace.h include/xorg/xacestr.h include/xorg/xorg-server.h include/xorg/xvdix.h include/xorg/xvmcext.h share/aclocal/xorg-server.m4 Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
2021-02-15dix: Add POINTER_RAWONLY flagOlivier Fourdan1-0/+1
This add a new flag POINTER_RAWONLY for GetPointerEvents() which does pretty much the opposite of POINTER_NORAW. Basically, this tells GetPointerEvents() that we only want the DeviceChanged events and any raw events for this motion but no actual motion events. This is preliminary work for Xwayland to be able to use relative motion events for raw events. Xwayland would use absolute events for raw events, but some X11 clients (wrongly) assume raw events to be always relative. To allow such clients to work with Xwayland, it needs to switch to relative raw events (if those are available from the Wayland compositor). However, Xwayland cannot use relative motion events for actual pointer location because that would cause a drift over time, the pointer being actually controlled by the Wayland compositor. So Xwayland needs to be able to send only relative raw events, hence this API. Bump the ABI_XINPUT_VERSION minor version to reflect that API addition. v2: Actually avoid sending motion events (Peter) v3: Keep sending raw emulated events with RAWONLY (Peter) Suggested-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Related: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1130
2021-02-01xquartz: Remove check for libdispatch now that we don't support pre-SnowLeopardJeremy Huddleston Sequoia1-3/+0
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2020-11-25dix: Extract FreezeThisEventIfNeededForSyncGrab()Povilas Kanapickas1-0/+4
2020-11-25dix: Extract ActivateGrabNoDeliver()Povilas Kanapickas1-0/+3
2020-11-25dix: Store replayed event into GrabInfoRec struct as InternalEvent*Povilas Kanapickas1-1/+1
2020-11-25dix: Rename LISTENER_* to TOUCH_LISTENER_*Povilas Kanapickas1-11/+12
2020-11-25dix: Extract DeliverDeviceClassesChangedEvent() utility functionPovilas Kanapickas1-2/+1
2020-11-25dix: Extract CopySprite() utilityPovilas Kanapickas1-0/+3
2020-09-15Consolidate fourcc.hMichel Dänzer3-0/+181
Move the copy in hw/xfree86/common to include/, and remove the one in hw/kdrive/src/. Fixes DIX glamor code including an xfree86 DDX header.
2020-07-10xserver/output: rename some badly named variables/APIs.Dave Airlie3-17/+17
This is an API and ABI break Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-05Fix spelling/wording issuesAlan Coopersmith5-7/+7
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-05-27meson: split udev from udev_kms which requires systemdJan Beich1-3/+3
DragonFly and FreeBSD can use xf86-input-libinput with config/udev. ld: error: undefined symbol: xf86PlatformDeviceProbe >>> referenced by xf86platformBus.c >>> xf86platformBus.c.o:(xf86platformProbe) in archive hw/xfree86/common/libxorg_common.a ld: error: undefined symbol: xf86PlatformDeviceCheckBusID >>> referenced by xf86platformBus.c >>> xf86platformBus.c.o:(xf86platformProbeDev) in archive hw/xfree86/common/libxorg_common.a ld: error: undefined symbol: xf86PlatformReprobeDevice >>> referenced by xf86platformBus.c >>> xf86platformBus.c.o:(xf86platformVTProbe) in archive hw/xfree86/common/libxorg_common.a ld: error: undefined symbol: NewGPUDeviceRequest >>> referenced by udev.c >>> udev.c.o:(device_added) in archive config/liblibxserver_config.a ld: error: undefined symbol: DeleteGPUDeviceRequest >>> referenced by udev.c >>> udev.c.o:(device_removed) in archive config/liblibxserver_config.a
2020-02-12meson: Add support for libunwindAdam Jackson1-0/+1
2020-01-14configure: Define GLAMOR_HAS_EGL_QUERY_DRIVER when availableKenneth Graunke1-0/+3
Commit 195c2ef8f9f07b9bdabc0f554a9033b7857b99c7 added this to the Meson build but neglected to add it to autotools. v2: Also update dix-config.h.in Fixes: 195c2ef8f ("glamor: Add a function to get the driver name via EGL_MESA_query_driver") Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> [v1] Reviewed-by: Eric Engestrom <eric@engestrom.ch> [v1] Reviewed-by: Matt Turner <mattst88@gmail.com>
2019-11-26glamor: Add a function to get the driver name via EGL_MESA_query_driverKenneth Graunke1-0/+2
This maps to eglGetDisplayDriverName if EGL_MESA_query_render is supported, otherwise it returns NULL.
2019-11-22xfree86: Test presence of isastream()Matt Turner2-0/+4
isastream() was never more than a stub in glibc, and was removed in glibc-2.30 by commit a0a0dc83173c ("Remove obsolete, never-implemented XSI STREAMS declarations"). Bug: https://bugs.gentoo.org/700838 Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Matt Turner <mattst88@gmail.com>
2019-11-09include: Increase the number of max. input devices to 256.Arthur Williams1-1/+3
Extending the decade old f0124ed93, to increase the number of input devices from 40 to 256. 40 translates at most 9 MD, while 256 will allow 63 MD. It is an arbitrary number, but people are hitting the current limit under reasonable conditions. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64793 Signed-off-by: Arthur Williams <taaparthur@gmail.com>
2019-10-30meson: Add sha1 library optionsJon Turney1-1/+1
v2: Set the define for xha1.c programatically, rather than using loads of conditionals.
2019-10-30include: Remove now-empty site.hAdam Jackson3-57/+0
2019-10-30dix: Move default screensaver defaults into globals.cAdam Jackson1-4/+0
2019-10-30include: Move some input-related default #defines to input.hAdam Jackson2-22/+22
2019-10-30dix: Remove -to option to set the default connection timeoutAdam Jackson2-2/+0
One minute is admittedly arbitrary, but again, pretty sure this never gets set on the command line in practice.
2019-10-30xdmcp: Remove unconfigurable COMPILEDDISPLAYCLASSAdam Jackson1-3/+0