summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2018-01-16build: Remove <*dbm.h> checksAdam Jackson2-12/+0
Formerly used by the rgb database code, which hasn't been a thing in over a decade. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-01-16meson: Enable SUN-DES-1 auth codeAdam Jackson1-0/+1
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2018-01-08animcur: Stop tracking the last display time in the SpriteInfoRecAdam Jackson1-1/+0
Reviewed-by: Robert Morell <rmorell@nvidia.com> Tested-by: Robert Morell <rmorell@nvidia.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-12-13os: Add epoll-like port implementation for SolarisPeter Harris1-0/+1
x11perf -noop with 200 xlogos connected is slightly faster with ports: before after Operation ---------- ----------------- -------------------- 18400000.0 19200000.0 (1.04) X protocol NoOperation Acked-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Harris <pharris@opentext.com>
2017-12-13os: Add epoll-like pollset implementation for AIXPeter Harris1-0/+1
AIX's poll only allows FD_SETSIZE entries in the fd list, which is insufficient for expanded MaxClients. As a bonus, x11perf -noop with ~250 xlogos connected is slightly faster with pollset: before after Operation --------- ---------------- -------------------- 5750000.0 5990000.0 (1.04) X protocol NoOperation Signed-off-by: Peter Harris <pharris@opentext.com> Acked-by: Keith Packard <keithp@keithp.com>
2017-11-06dix: Remove ffs.cAdam Jackson4-12/+0
Your libc has ffs, I promise. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-10-30modesetting: Fix potential buffer overflowDaniel Martin1-1/+1
If one misconfigures a ZaphodHeads value (more than 20 characters without a delimiter), we get an overflow of our buffer. Use xstrtokenize() instead of writing/fixing our own tokenizer. Signed-off-by: Daniel Martin <consume.noise@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-10-24dix: Don't track the XKB client versions in the ClientRecAdam Jackson2-3/+3
XKB stores some stuff in the ClientRec that, style-wise, should probably be in a client private. vMinor tracks the client's idea of the XKB minor version, but is never read, we can just nuke it. vMajor is only used for a bug-compat workaround for X11R6.0-vintage clients. We're only using though (1<<4) for xkbClientFlags in the protocol, so we can pack that field down to a u8 and store the bug-compat flag there. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2017-10-24dix: Don't vary the ClientRec ABI at build timeAdam Jackson1-2/+0
Just no. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Julien Cristau <jcristau@debian.org>
2017-10-20meson: Don't forget to define DEBUG!Lyude Paul1-1/+3
Changes since v2: - Don't enable by default for debugoptimized builds Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-10-12meson: Add xkb_bin_dir optionLyude Paul1-1/+1
Now that we can actually configure all of the directories xkb uses for finding things, we can (finally, but only with meson) finally make it so that with the correct meson configuration the Xserver will "just work" without any additional changes to the installation prefix after building. For the people like me who have since scripted this part out of their build process and forgotten about it, building and installing the X server into a non-standard prefix has always required the following (or something else that makes sure that X has a valid xkbcomp configuration) commands be run right after doing the installation: # start in root of prefix you installed X to mkdir -pv share/X11/xkb/rules ln -s /usr/share/X11/xkb/rules/evdev share/X11/xkb/rules/ rm -f bin/xkbcomp ln -s /usr/bin/xkbcomp bin/ The one last piece of getting rid of this post-install junk is making sure that we can control the directory that X uses for finding the xkbcomp binary from meson so we can point it at the system provided xkbcomp (/usr/bin/xkbcomp or similar). So, this patch adds a configuration option for controlling this called xkb_bin_dir. Signed-off-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-10-04meson: Check for HAVE_TYPEOFAdam Jackson1-1/+4
Without this, exa's gc swap macros trigger gcc's -Wdiscarded-qualifiers. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
2017-09-23meson: Make it possible to build for 32-bit targetsJon Turney1-1/+1
Setting glx_align64 to '' gives a null string in the arguments list passed to the compiler. This is taken as an input filename, leading to: "cc: error: : No such file or directory" Instead, assign an empty list to glx_align64, which gets flattened to nothing in the arguments list. Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2017-09-20meson: Use dependency version_compare()Daniel Stone1-4/+3
We can check the version on an existing dependency, rather than spinning up pkg-config again just to check the right version. Signed-off-by: Daniel Stone <daniels@collabora.com>
2017-09-20sync: Convert from "CARD64" to int64_t.Eric Anholt1-0/+29
The extension was using the name CARD64 to represent 64-bit values, with a #define from CARD64 to XSyncValue, a struct with a pair of 32-bit values representing a signed 64-bit value. This interfered with protocol headers using CARD64 to try to actually store a uint64_t. Now that stdint.h exists, let's just use that here, instead. v2: Fix alarm delta changes. v3: Do the potentially overflowing math as uint and convert to int afterward, out of C spec paranoia. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2017-08-15Make PixmapDirtyUpdateRec::src a DrawablePtrMichel Dänzer3-6/+8
This allows making the master screen's pixmap_dirty_list entries explicitly reflect that we're now tracking the root window instead of the screen pixmap, in order to allow Present page flipping on master outputs while there are active slave outputs. Define HAS_DIRTYTRACKING_DRAWABLE_SRC for drivers to check, but leave HAS_DIRTYTRACKING_ROTATION defined as well to make things slightly easier for drivers. Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-08-14meson: Fix epoll detectionPeter Harris1-1/+1
The epoll code depends on epoll_create1, not epoll_create. Signed-off-by: Peter Harris <pharris@opentext.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
2017-06-20dix: Remove extension aliasesAdam Jackson1-6/+0
This appears to be essentially unused. The only known client-side library for the SELinux extension is xcb, which does not look for the name "Flask". The "SGI-GLX" alias for GLX appears to be a bit of superstition at this point, NVIDIA's driver does not expose it and Mesa does not check for it. Signed-off-by: Adam Jackson <ajax@redhat.com> Acked-by: Keith Packard <keithp@keithp.com>
2017-06-20include: Remove some unused macrosAdam Jackson1-5/+0
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2017-06-02Add meson.build for XWin server (v2)Jon Turney2-6/+50
This needs a meson with PRs #1784, #1792 and #1794 Future work: remove conditionals which are always on, and simplify redundant CYGDEBUG conditionals Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Eric Anholt <eric@anholt.net>
2017-06-02meson: Fix enabling of xshmfence.Eric Anholt1-1/+1
I misspelled the enable flag, so DRI3 would throw BadImplementation when you tried to start any GL app. Same as in c7be7a688a78a34f61b90c0d95914e14b90b0cdc, we also convert it to #ifdef for consistency. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-12meson: Fix CLOCK_MONOTONIC testAdam Jackson1-0/+3
C99 isn't enough on its own to get POSIX feature sets defined. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-05-10meson: Detect strlcat/strlcpy/reallocarray in libbsdPeter Harris2-3/+9
If we're linking with libbsd anyway, we might as well use the functions it provides instead of compiling our replacements. Signed-off-by: Peter Harris <pharris@opentext.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2017-05-10meson: Detect more functionsPeter Harris1-2/+8
Set HAVE_REALLOCARRAY, HAVE_SIGACTION, HAVE_STRCASESTR, HAVE_STRLCAT, HAVE_STRLCPY, HAVE_TIMINGSAFE_MEMCMP, and BUSFAULT. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Peter Harris <pharris@opentext.com>
2017-05-10meson: Detect arc4random_bufPeter Harris1-0/+1
Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Peter Harris <pharris@opentext.com>
2017-05-10meson: Make driprotos and libdrm optionalJon TURNEY1-2/+2
Add options for DRI{1,2,3} shmfence is required for DRI3 libdrm is required for any DRI{1,2,3} Consolidate calls to dependency('libdrm') Set WITH_LIBDRM when building with libdrm v2: Initialize libxserver_dri3 to [] Manually flatten libxserver, since meson doesn't (currently) Use version_compare rather than circumloctions with dependency() Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Eric Anholt <eric@anholt.net>
2017-05-10meson: Remove stray whitespaceJon TURNEY1-1/+1
Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-05-04meson: Make xf86vidmode optionalJon TURNEY1-1/+1
Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-05-03xfree86: Silence a new glibc warningAdam Jackson2-0/+4
glibc would like to stop declaring major()/minor() macros in <sys/types.h> because that header gets included absolutely everywhere and unix device major/minor is perhaps usually not what's expected. Fair enough. If one includes <sys/sysmacros.h> as well then glibc knows we meant it and doesn't warn, so do that if it exists. Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-04-26Add a Meson build system alongside autotools.Eric Anholt2-0/+480
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest, and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but hasn't been built yet. The unit tests are also not done. The intent is to build this as a complete replacement for the autotools system, then eventually replace autotools. meson is faster to generate the build, faster to run the bulid, shorter to write the build files in, and less error-prone than autotools. v2: Fix indentation nits, move version declaration to project(), use existing meson_options for version-config.h's vendor name/web. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26Use #ifdef instead of #if for features to make Meson easier.Eric Anholt3-3/+3
We mostly use #ifdef throughout the tree, and this lets the generated config.h files just be #define TOKEN instead of #define TOKEN 1. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2017-04-25Remove support for unaligned swaps.Eric Anholt1-12/+3
The previous misc.h code went out of its way to allow swapping of unaligned pointers to values. However, the members of an X request/response are always naturally aligned within the struct, and the buffers containing a request/response will also be aligned to at least 8 bytes, so we can just drop it. text data bss dec hex filename before: 2215167 51552 132016 2398735 249a0f hw/xfree86/Xorg after: 2214919 51552 132016 2398487 249917 hw/xfree86/Xorg Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2017-04-25Rewrite the byte swapping macros.Eric Anholt1-63/+34
The clever pointer tricks were actually not working, and we were doing the byte-by-byte moves in general. By just doing the memcpy and obvious byte swap code, we end up generating actual byte swap instructions, thanks to optimizing compilers. text data bss dec hex filename before: 2240807 51552 132016 2424375 24fe37 hw/xfree86/Xorg after: 2215167 51552 132016 2398735 249a0f hw/xfree86/Xorg Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2017-04-25xorg: Change __XCONFIGFILE__ to XCONFIGFILE (and DIR) to fix scan.c.Eric Anholt2-3/+3
parser/scan.c was checking for #ifdef XCONFIGFILE and XCONFIGDIR and defaulting to "xorg.conf", and "xorg.conf.d", so if you had changed __XCONFIGFILE__ to anything else, it would have got out of sync. Settle on the name without gratuitous underscores. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2017-04-21glx: Use the same endian swapping as the rest of the server.Eric Anholt1-15/+0
This dumps a ton of configure-time checks for system endian macros. Given that we're marking the mixed-endian fixup code as cold, getting at the system macros is a waste of code. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2017-03-27dpms: Consolidate a bunch of stuff into Xext/dpms.cAdam Jackson1-10/+0
Most of this is a legacy of the old "extmod" design where you could load _some_ extensions dynamically but only if the server had been built with support for them in the first place. Note that since we now only initialize the DPMS extension if at least one screen supports it, we no longer need DPMSCapableFlag: if it would be false, we would never read its value. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2017-03-27dix: Lift DPMS to a screen hookAdam Jackson1-0/+3
Following on from the previous change, this adds a DPMS hook to the ScreenRec and uses that to infer DPMS support. As a result we can drop the dpms stub code from Xext. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2017-03-23kdrive: Drop kdrive-config.h.Eric Anholt1-25/+0
It had nothing left in it that was used but wasn't in dix-config.h. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2017-03-23kdrive: Remove vestiges of TSLIB support.Eric Anholt3-12/+0
The actual code was gone in 27819950e4158326e0f83a30f2e8968b932625ef, but some checks remained. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2017-03-23kdrive: Unifdef KDRIVE_EVDEV.Eric Anholt1-3/+0
ajax deleted the evdev driver in the removal of fbdev and the linux backend. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2017-03-21dix: Remove PRIVATE_DAMAGEAdam Jackson1-1/+0
None of this is actually wired up to anything, so we can also remove the devPrivates from the DamageRec. The DamageExtRec is what would need devPrivates for selinux labeling, in principle. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2017-03-17fb: Remove 24bpp support (v3)Adam Jackson1-7/+0
v2: - Require power-of-two bpp in ScreenInit - Eliminate fbCreatePixmapBpp v3 - Squash in the exa and glamor changes so we can remove pRotatedPixmap in the same stroke. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-03-07glamor: use drmGetDeviceNameFromFD2 when availableQiang Yu1-0/+3
This is for glamor can support fd from DRM render node which is useful for a render only DDX. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
2017-02-28Use arc4random_buf(3) if available to generate cookies.Matthieu Herrb1-0/+6
Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
2017-02-28Use timingsafe_memcmp() to compare MIT-MAGIC-COOKIES CVE-2017-2624Matthieu Herrb2-0/+8
Provide the function definition for systems that don't have it. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-02-27os: log a bug whenever WriteToClient is called from the input threadPeter Hutterer1-0/+1
The input thread should generate events, not send them. Make it easier to find the instances where it's doing so. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
2017-02-23dix: Add a callback chain for window property state changeAdam Jackson1-0/+8
This will be used by in-server features that need to react to property changes. The first one will be _XWAYLAND_ALLOW_COMMITS. Signed-off-by: Adam Jackson <ajax@redhat.com> [Pekka: add commit message body] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-01-19kdrive: Remove non-evdev input driversAdam Jackson1-6/+0
Use evdev. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-01-11AttendClient of grab-pervious client must queue to saved_ready_clients [v2]Keith Packard1-0/+6
A client which is attended while a grab is blocking execution of its requests needs to be placed in the saved_ready_clients list so that it will get scheduled once the grab terminates. Otherwise, if the client never sends another request, there is no way for it to be placed in the ready_clients list. v2: Wrap comment above mark_client_saved_ready. Remove test for OS_COMM_IGNORED which will always be true. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99333 Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2017-01-04xkb: Match key releases with an overlaid pressMihail Konev1-0/+2
Testcase: In ~/.xbindkeysrc: "xterm &" XF86LaunchA In ~/ov.xkb: xkb_keymap { xkb_keycodes { include "evdev" }; xkb_types { include "complete" }; xkb_compat { include "complete" interpret Overlay1_Enable+AnyOfOrNone(all) { action= SetControls(controls=Overlay1); }; }; xkb_symbols { include "pc+inet(evdev)+us" key <INS> { [ Overlay1_Enable ] }; key <AE01> { overlay1 = <AE02> }; // Insert+1 => 2 key <TLDE> { overlay1 = <I128> }; // Insert+~ => XF86LaunchA }; xkb_geometry { include "pc(pc104)" }; }; Apply this layout: 'xkbcomp ~/ov.xkb $DISPLAY'. Run "xbindkeys -n -v" In the exact order: - press Insert - press Tilde - release Insert - wait - release Tilde Keyboard input in the new terminal window(s) would be locked until another Insert+Tilde . Reported-by: Mariusz Mazur <mariusz.g.mazur@gmail.com> Signed-off-by: Mihail Konev <k.mvc@ya.ru> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>