aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/include
Commit message (Collapse)AuthorAgeFilesLines
* VCS info lines: Remove ancient X.org / XFree86 VCS info line from code files.Mike Gabriel2016-07-0646-77/+0
| | | | | This has already been started while replacing copyright info in file headers and has now been completed with this commit.
* remove unreferenced NEED_EVENTS/NEED_REPLIESUlrich Sibiller2016-07-052-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove defines of NEED_EVENTS and NEED_REPLIES because they are never used anywhere. Basically these three commits, but as they are newer and to not match the code structure the patches have not been applied but replaced by sed + manual intervention: From cb95642dc8edebb2935dd471f8b339cb98aa8481 Mon Sep 17 00:00:00 2001 From: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri, 28 Nov 2008 22:28:32 +1000 Subject: Remove #define NEED_EVENTS and NEED_REPLIES A grep on xorg/* revealed there's no consumer of this define. Quote Alan Coopersmith: "The consumer was in past versions of the headers now located in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h, all the event definitions were only available if NEED_EVENTS were defined, and all the reply definitions required NEED_REPLIES. Looks like Xproto.h dropped them by X11R6.3, which didn't have the #ifdef's anymore, so these are truly ancient now." Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com> -- From 6de368c9aa7ccd2fcd62fca5a2b278913db4d03d Mon Sep 17 00:00:00 2001 From: Fernando Carrijo <fcarrijo@yahoo.com.br> Date: Thu, 1 Jul 2010 06:50:47 -0300 Subject: Purge macros NEED_EVENTS and NEED_REPLIES Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> -- From 57c03e52e6b4e3ed54df5fdd778865467d08e119 Mon Sep 17 00:00:00 2001 From: Fernando Carrijo <fcarrijo@yahoo.com.br> Date: Thu, 1 Jul 2010 06:59:48 -0300 Subject: Purge macro NEED_EVENTS Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Remove unneccesary casts from WriteToClient callsAlan Coopersmith2016-07-051-2/+2
| | | | | | | | | | | | | | Casting return to (void) was used to tell lint that you intended to ignore the return value, so it didn't warn you about it. Casting the third argument to (char *) was used as the most generic pointer type in the days before compilers supported C89 (void *) (except for a couple places it's used for byte-sized pointer math). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org> Backport to nx-libs: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* Make WriteToClient take a const void * like any decent IO write function.Kristian Høgsberg2016-07-051-2/+2
| | | | | Enough with the casting. Doesn't break API or even ABI, but does make a lot of silly casts superfluos.
* Xserver/os/log.c: Make sure strlcpy is defined in log.c. Immitate what is ↵Mike Gabriel2016-07-051-0/+7
| | | | done in X.org.
* Use internal temp variable for swap macros. Make swaps/swapl type safe ↵Mike Gabriel2016-07-041-21/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (introducing wrong_size check at build time). While working on this changeset, various spots got discovered where swapl or swaps was used on a wrong type, where byte swapping calls had been forgotten or done on the wrong variable. This backport at least includes changes from the following X.org commits, listed in non-chronological order: commit 2c7c520cfe0df30f4bc3adba59d9c62582823bf8 Author: Matt Turner <mattst88@gmail.com> Date: Thu Aug 4 15:35:41 2011 -0400 Use internal temp variable for swap macros Also, fix whitespace, mainly around swaps(&rep.sequenceNumber) Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit 9edcae78c46286baff42e74bfe26f6ae4d00fe01 Author: Matt Turner <mattst88@gmail.com> Date: Wed Sep 21 17:14:16 2011 -0400 Use correct swap{l,s} (or none at all for CARD8) Swapping the wrong size was never caught because swap{l,s} are macros. It's clear in the case of Xext/xres.c, that the author believed client_major/minor to be CARD16 from looking at the code in the first hunk. v2: dmx.c fixes from Keith. Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit dab064fa5e0b1f5c67222562ad5367005832cba1 Author: Andrea Canciani <ranma42@gmail.com> Date: Tue Nov 2 20:10:32 2010 +0100 render: Fix byteswapping of gradient stops The function swapStops repeatedly swaps the color components as CARD16, but incorrectly steps over them as if they were CARD32. This causes half of the stops not to be swapped at all and some unrelated data be swapped instead. Signed-off-by: Andrea Canciani <ranma42@gmail.com> Reviewed-by: Soren Sandmann <sandmann@daimi.au.dk> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 54770c980cd2b91a8377f975a58ed69def5cfa42 Author: Matt Turner <mattst88@gmail.com> Date: Tue Aug 16 16:59:07 2011 -0400 Cast char* buffers to swap functions Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit 6844bd2e63490870bab3c469eec6030354ef2865 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jan 9 19:52:00 2008 -0800 More Xv extension byte swapping fixes commit e46f6ddeccd082b2d507a1e8b57ea30e6b0a2c83 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Jan 16 14:24:22 2008 +0100 Yet another Xv extension byte swapping fix.
* os: Remove deprecated malloc/free wrappers, clean ↵Mike Gabriel2016-07-021-13/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | {X,XNF}{alloc,calloc,realloc,free,strdup} from pre-C89 baggage Backported from X.org: commit cad9b053d52f62432dfd70e42e0240de77027cae Author: Adam Jackson <ajax@redhat.com> Date: Tue Jul 8 13:24:25 2014 -0400 os: Remove deprecated malloc/free wrappers Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit e983848ab44b0769f97f6207f1aa8b4f127be6a9 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Thu May 6 00:16:24 2010 +0700 Clean {X,XNF}{alloc,calloc,realloc,free,strdup} from pre-C89 baggage C89 guarantees alignment of pointers returned from malloc/calloc/realloc, so stop fiddling with alignment manually and just pass the arguments to library functions. Also convert silent error when negative size is passed into function into warning in log file. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Backport to nx-libs: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* nx-X11/programs/Xserver: Drop {X,x}alloc() macros, use malloc() instead.Mike Gabriel2016-07-021-1/+1
|
* nx-X11/programs/Xserver: Drop {X,x}free() macros, use free() instead.Mike Gabriel2016-07-021-1/+1
| | | | Fixes ArcticaProject/nx-libs#105
* Xserver/include/protocol-versions.h: Switch to having an Xserver-specific ↵Mike Gabriel2016-07-021-0/+182
| | | | header file containing all use protocol versions.
* nxagent Xserver: Drop Kerberos code. Not used in nxagent.Mike Gabriel2016-07-011-4/+0
|
* dix/randr: add a hooks into screen to (a) replace scanout pixmap and (b) for ↵Mike Gabriel2016-06-211-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | additional cursor confinement Backported from X.org: commit c41922940adbc8891575b3321fadf01ff4cb5854 Author: Dave Airlie <airlied@redhat.com> Date: Tue Jun 26 10:00:21 2012 +0100 dix/randr: add a hook into screen to replace scanout pixmap For DRI2 in some offload cases we need to set a new pixmap on the crtc, this hook allows dri2 to call into randr to do the necessary work to set a pixmap as the scanout pixmap for the crtc the drawable is currently on. This is really only to be used for unredirected full screen apps in composited environments. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit e65c3f8bcc86845f21ac575e2bfb4b21b67d5ebf Author: Adam Jackson <ajax@redhat.com> Date: Wed Jan 5 12:04:19 2011 -0500 dix: Add a Screen method for additional cursor confinement This just reserves the slot in the ABI. Confining cursors to CRTCs will come soon. v2: Just reserve the slot. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com> Backport to nx-libs: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* include: add version_compare helper functionMike Gabriel2016-06-211-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backported from X.org: commit 0df871cf34ee5f1a85586206027de9b02fb364ec Author: Robert Ancell <robert.ancell@canonical.com> Date: Thu May 22 10:43:52 2014 +1200 Fix overflow checking extension versions The easiest way to check for the version of an extension is to send the maximum possible version numbers in the QueryVersion request. The X server overflows on these as it assumes you will send a reasonable version number. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit ffd4874798ba54f86acac75779a15b4babeaa5f3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 11 12:20:50 2011 +1000 include: add version_compare helper function Compare two version numbers in the major.minor form. Switch the few users of manual version switching over to the new function. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Backport to nx-libs: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* Move each screen's root-window pointer into ScreenRec.Mike Gabriel2016-06-212-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Backported from X.org: commit e7fae9ecc42ab5e73b89117722dbf4117d928f9a Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 22 00:26:28 2010 -0700 Move each screen's root-window pointer into ScreenRec. Many references to the WindowTable array already had the corresponding screen pointer handy, which meant they usually looked like "WindowTable[pScreen->myNum]". Adding a field to ScreenRec instead of keeping this information in a parallel array simplifies those expressions, and eliminates a MAXSCREENS-sized array. Since dix uses this data, a screen private entry isn't appropriate. xf86-video-dummy currently uses WindowTable, so it needs to be updated to reflect this change. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux) Backport to nx-libs: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* Centralize declaration of ConnectionInfo.Mike Gabriel2016-06-211-0/+1
| | | | | | | | | | | | | Backported from X.org: commit 64ef7ed072007b1d0b4de5ff1e5eababa418c794 Author: Adam Jackson <ajax@redhat.com> Date: Wed Aug 20 13:14:03 2008 -0400 Centralize declaration of ConnectionInfo. Author: Adam Jackson <ajax@redhat.com> Backport to nx-libs: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* noRRXineramaExtension: Make Boolean configurable via new cmdline switch ↵Mike Gabriel2016-06-211-0/+1
| | | | (+|-rrxinerama).
* XFreeXDGA: Drop all Xserver code blocks that relate to removed XFreeXDGA ↵Mike Gabriel2016-06-011-4/+0
| | | | extension.
* XF86MISC: Drop all Xserver code blocks that relate to removed XF86MISC ↵Mike Gabriel2016-06-011-4/+0
| | | | extension.
* MITMISC: Drop all Xserver code blocks that relate to removed MITMISC extension.Mike Gabriel2016-06-011-4/+0
|
* XF86VIDMODE: Drop all Xserver code blocks that relate to removed XF86VIDMODE ↵Mike Gabriel2016-06-011-4/+0
| | | | extension.
* MULTIBUFFER: Drop all Xserver code blocks that relate to removed MULTIBUFFER ↵Mike Gabriel2016-06-011-4/+0
| | | | extension.
* LBX: Drop all Xserver code blocks that relate to removed LBX extension.Mike Gabriel2016-06-016-41/+0
|
* EVI: Drop all Xserver code blocks that relate to removed EVI extension.Mike Gabriel2016-06-011-4/+0
|
* FONTCACHE: Drop all Xserver code blocks that relate to removed FONTCACHE ↵Mike Gabriel2016-06-011-4/+0
| | | | extension.
* XEVIE: Drop all Xserver code blocks that relate to removed XEVIE extension.Mike Gabriel2016-06-013-11/+0
|
* TOGCUP: Drop all Xserver code blocks that relate to removed TOGCUP extension.Mike Gabriel2016-06-011-4/+0
|
* XAPPGROUP: Drop all Xserver code blocks that relate to removed XAPPGROUP ↵Mike Gabriel2016-06-012-7/+0
| | | | extension.
* nx-X11/programs/Xserver/{dix/{colormap.c,window.c},hw/nxagent/NXwindow.c,inc ↵Mihai Moldovan2016-05-253-1/+36
| | | | lude/{colormap,window{,str}}.h}: backport features needed for Composite 0.4.
* Adapt API for MakeAtom() and CopyISOLatin1Lowered to latest changes in X.org.Mike Gabriel2016-05-021-3/+3
| | | | | | | | | This requires adaptations of arguments' types for the external references to MakeAtom() and CopyISOLatin1Lowered(). These adaptations have been required in Xserver/include/dix.h, Xserver/include/dixfonts.c Xserver/dix/atom.c, Xserver/dix/dixutils.c, Xserver/os/oscolor.c.
* Add REGION_ macros for source compatibility with existing drivers.Mike Gabriel2016-05-021-0/+39
| | | | | | | | | | | | This makes the region code changes source compatible with existing code, although none of them are used within the server source itself. In NX, this patch is not really necessary, but it has been backported with the previous patches for the sake of backporting the complete mi/miregion.c -> dix/region.c change in X.Org. v1: Keith Packard <keithp@keithp.com> v2: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> (backported to nx-libs)
* Change region implementation names to eliminate the 'mi' prefixMike Gabriel2016-05-021-30/+30
| | | | | | | | | | This prepares the file to be moved from mi to dix. This patch was done mechanically with the included scripts 'fix-miregion' run over the entire X server and 'fix-miregion-private' run over include/regionstr.h and mi/miregion.c. v1: Keith Packard <keithp@keithp.com> v2: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> (backported to nx-libs)
* pixman-devel: Build against shared library pkg-config(pixman-1).Mike Gabriel2016-05-021-0/+4
|
* Change region implementation from macros to inline functions.Mike Gabriel2016-05-023-224/+183
| | | | | | | | | This makes all of the previous macros into inline functions and also turns all of the direct calls to pixman region code into inline functions as well. v1: Keith Packard <keithp@keithp.com> v2: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* Rename region macros to eliminate screen argumentMike Gabriel2016-05-021-57/+57
| | | | | | | | | | | | | | | | | | | | | This is a huge mechanical patch and a few small fixups required to finish the job. They were reviewed separately, but because the server does not build without both pieces, I've merged them together at this time. The mechanical changes were performed by running the included 'fix-region' script over the whole nx-X11/programs/Xserver tree: $ cd nx-X11/programs/Xserver && ( git ls-files | grep -v '^fix-' | xargs ./fix-region; ) And then, the white space errors in the resulting patch were fixed using the provided fix-patch-whitespace script. $ sh ./fix-patch-whitespace Thanks to Jamey Sharp for the mighty fine sed-generating sed script. v1: Keith Packard <keithp@keithp.com> (X.Org xserver commit: 2dc138922b7588515d5f2447e4b9dcdc0bef15e0) v2: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> (apply fix-region script to nx-libs)
* Xserver globals.h: Make PanoramiXExtensionDisabledHack globally available.Mike Gabriel2015-12-301-0/+1
|
* pointer typedef in Xdefs.h: also catch Xdefs.h include in include/misc.h, ↵Mike Gabriel2015-12-282-6/+17
| | | | make undoing the FIXME more obvious.
* pointer typedef in Xdefs.h: Define pointer type for building against older ↵Mike Gabriel2015-12-281-2/+8
| | | | Xlib versions that still expect the pointer type to exist (e.g. Ubuntu <= 14.04, Debian <= 7.0).
* Clear header file namespace separation (<X11/...> vs. <nx-X11/...>).Mike Gabriel2015-12-2815-24/+24
| | | | | | | | | | | | | | | | | | | | In the process of building nxagent against more and more system-wide installed X.org libraries, we come to the limit of including structs from this (bundled nx-X11) and that (system-wide X.Org) library. This commit introduces a clear namespace separation of headers provided by nx-X11 and headers provided by X.Org. This approach is only temporary as we want to drop all nx-X11 bundled libraries from nx-libs. However, for a while we need to make this separation clear and also ship some reduced fake X.Org headers that avoid pulling in libX* and libNX_X* symbols at the same time. This patch has been tested on Debian jessie and unstable and requires no overall testing on various distros and distro versions, as we finally will drop all libNX_X* libraries and build against X.org's client libs. For now, this hack eases our development / cleanup process.
* Replace 'pointer' type with 'void *'Keith Packard2015-12-2823-120/+131
| | | | | | | | | | This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer' is used throughout the X server for other things, and having duplicate names generates compiler warnings. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net> Rebased against NX: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* nx-X11/config/cf: Drop unnecessary xf86site.def, xf86.tmpl, xfree86.cf.Mike Gabriel2015-06-211-1/+1
|
* include: introduce byte counting functions.Peter Hutterer2015-02-171-0/+30
| | | | | | | | | | | | | | | | | | | | This patch adds the following three functions: bits_to_bytes(bits) - the number of bytes needed to hold 'bits' bytes_to_int32(bytes) - the number of 4-byte units to hold 'bytes' pad_to_int32(bytes) - the closest multiple of 4 equal to or larger than 'bytes'. All three operations are common in protocol processing and currently the server has ((foo + 7)/8 + 3)/4 operations all over the place. A common set of functions reduce the error rate of these (albeit simple) calculations and improve readability of the code. The functions do not check for overflow. v2: backport to nx-libs 3.6.x as a prereq for the CVE-2015-0255 fix (Mike DePaulo) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Xi: unvalidated lengths in Xinput extension [CVE-2014-8095]Alan Coopersmith2015-02-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Multiple functions in the Xinput extension handling of requests from clients failed to check that the length of the request sent by the client was large enough to perform all the required operations and thus could read or write to memory outside the bounds of the request buffer. This commit includes the creation of a new REQUEST_AT_LEAST_EXTRA_SIZE macro in include/dix.h for the common case of needing to ensure a request is large enough to include both the request itself and a minimum amount of extra data following the request header. v2: backport to nx-libs 3.6.x (Mike DePaulo) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Conflicts: Xi/chgdctl.c Xi/chgfctl.c Xi/xiallowev.c Xi/xichangecursor.c Xi/xichangehierarchy.c Xi/xigetclientpointer.c Xi/xigrabdev.c Xi/xipassivegrab.c Xi/xiproperty.c Xi/xiquerydevice.c Xi/xiquerypointer.c Xi/xiselectev.c Xi/xisetclientpointer.c Xi/xisetdevfocus.c Xi/xiwarppointer.c [RHEL5: Xi/xi* files are XI2 ]
* dix: integer overflow in REQUEST_FIXED_SIZE() [CVE-2014-8092 4/4]Alan Coopersmith2015-02-141-1/+4
| | | | | | | | | | | | | Force use of 64-bit integers when evaluating data provided by clients in 32-bit fields which can overflow when added or multiplied during checks. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> RHEL5: add #include <stdint.h> for uint64_t v3: backport to nx-libs 3.6.x (Mike DePaulo)
* dix: integer overflow in RegionSizeof() [CVE-2014-8092 3/4]Alan Coopersmith2015-02-141-3/+7
| | | | | | | | | | | | | | | | | | RegionSizeof contains several integer overflows if a large length value is passed in. Once we fix it to return 0 on overflow, we also have to fix the callers to handle this error condition v2: Fixed limit calculation in RegionSizeof as pointed out by jcristau. v3: backport to nx-libs 3.6.x (Mike DePaulo) Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Conflicts: dix/region.c include/regionstr.h
* Provide build support for aarch64 architecture ↵Orion Poplawski2015-02-131-0/+22
| | | | (606_nx-X11_build-on-aarch64.full.patch).
* drop .original files from the current code baseMike Gabriel2015-02-022-469/+0
|
* Imported nx-X11-3.1.0-1.tar.gznx-X11/3.1.0-1Reinhard Tartler2011-10-1049-0/+9641
Summary: Imported nx-X11-3.1.0-1.tar.gz Keywords: Imported nx-X11-3.1.0-1.tar.gz into Git repository