aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/dix/devices.c
Commit message (Collapse)AuthorAgeFilesLines
* xkbsrv.h: move extern XkbFreePrivates to central include fileUlrich Sibiller2020-01-061-2/+0
|
* rework xkb device private handlingUlrich Sibiller2019-06-221-0/+9
| | | | | | | We can only free the xkbDevicePrivate because we do not know the details of any other (possible) extension. So let's limit to that one private for now and call the new xkbFreePrivates from dix (where such a function is completely missing).
* CloseDevice: call XkbRemoveResourceClient before freeing key class structUlrich Sibiller2019-06-191-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | This patch is not necessary at the current code level. But when xkb code introduced the dev->key check Xorg upstream missed that. So we backport it now to skip that trap when updating xkb code. Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Jan 4 18:21:54 2010 -0800 CloseDevice: call XkbRemoveResourceClient before freeing key class struct XkbRemoveResourceClient() returns immediately if dev->key is NULL. CloseDevice calls XkbRemoveResourceClient until it removes all resources. If we free dev->key and NULL it before XkbRemoveResourceClient, then infinite loop ensues, and the server appears to hang on exit or crash. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* ProcGetPointerMapping uses rep.nElts before it is initializedUlrich Sibiller2018-07-031-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of this xorg upstream commit (with omitting the mentioned d792ac125a0462a04a930af543cbc732f8cdab7d). commit 34cf559bcf99dad550527b5ff53f247f0e8e73ee Author: Keith Packard <keithp@keithp.com> Date: Tue Jul 10 15:58:48 2012 -0700 ProcGetPointerMapping uses rep.nElts before it is initialized In: commit d792ac125a0462a04a930af543cbc732f8cdab7d Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in dix Replies the initializer for the .length element of the xGetPointerMappingReply structure uses the value of rep.nElts, but that won't be set until after this initializer runs, so we get garbage in the length element and clients using it will generally wedge. Easy to verify: $ xmodmap -pp Fixed by creating a local nElts variable and using that. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* Fix some valgrind findingsUlrich Sibiller2018-07-031-10/+8
| | | | | | Some of them have not been seen in the wild yet. Partly fixes ArcticaProject/nx-libs#711
* Lift dix to xorg-xserver-1.3.0.0 stateUlrich Sibiller2018-02-261-38/+3
|
* reduce usage of uninitialised bytesUlrich Sibiller2017-12-281-2/+3
| | | | as reported by valgrind
* DIX: XKB: Set xkbInfo to NULL as well as freeing itDaniel Stone2017-12-071-0/+1
| | | | | | | | | | | | | | | | | Backported from X.org: commit 512bac25ec0e980968b93a2ebe88bd89bf99b697 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Nov 6 14:52:03 2007 +0000 DIX: XKB: Set xkbInfo to NULL as well as freeing it (bug # 10639) XkbRemoveResourceClient wants to access xkbInfo if it exists, so make sure we NULL it after freeing it. It doesn't make much sense to move the RemoveResourceClient call first, as there's not much point in notifying clients while we're shutting the server down anyway. Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
* dix: Fix compiler warningUlrich Sibiller2017-03-101-1/+2
| | | | | | devices.c: In function ‘_AddInputDevice’: devices.c:120:22: warning: assignment from incompatible pointer type [enabled by default] dev->devPrivates = dev->unwrapProc = NULL;
* replace (DE)ALLOCATE_LOCAL by malloc/freeUlrich Sibiller2017-03-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | This is basically a backport of the following commits + replacing xalloc/xfree by malloc/free. Fixes ArcticaProject/nx-libs#358. commit 2761c103311a1160bc483fd0367d654733df8598 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:03:26 2007 +0000 OS: Remove usage of alloca Replace with heap allocations. commit 5e363500c86042c394595e1a6633581eb8fcd1bb Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:38:28 2007 +0000 OS: Remove ALLOCATE_LOCAL from os.h Remove ALLOCATE_LOCAL_FALLBACK and DEALLOCATE_LOCAL_FALLBACK from os.h, and remove the include of Xalloca.h as well.
* Fix "uninitialised byte(s)" complaints from valgrindUlrich Sibiller2017-03-021-15/+14
|
* drop platform support: unifdef sgi.Mike Gabriel2017-02-081-6/+0
| | | | Relates to ArcticaProject/nx-libs#275.
* dix: fix cast from pointer to integerJulien Cristau2016-10-201-1/+1
|
* xserver: adapt xkbsrc includes syntax to match upstreamUlrich Sibiller2016-10-061-1/+1
|
* xserver: remove define XKB_IN_SERVERUlrich Sibiller2016-10-061-1/+0
| | | | it is no longer needed because the code here is only used in the server.
* xserver: use own copy of XKBsrv.h headerUlrich Sibiller2016-10-061-1/+1
| | | | just like upstream does
* VCS info lines: Remove ancient X.org / XFree86 VCS info line from code files.Mike Gabriel2016-07-061-3/+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-051-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>
* nx-X11/programs/Xserver: Drop {X,x}alloc() macros, use malloc() instead.Mike Gabriel2016-07-021-18/+18
|
* nx-X11/programs/Xserver: Drop {X,x}free() macros, use free() instead.Mike Gabriel2016-07-021-28/+28
| | | | Fixes ArcticaProject/nx-libs#105
* LBX: Drop all Xserver code blocks that relate to removed LBX extension.Mike Gabriel2016-06-011-9/+0
|
* Clear header file namespace separation (<X11/...> vs. <nx-X11/...>).Mike Gabriel2015-12-281-4/+4
| | | | | | | | | | | | | | | | | | | | 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-281-1/+1
| | | | | | | | | | 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>
* Backport: xserver: Avoid sending uninitialized padding data over the networkPeter Åstrand2015-07-021-0/+2
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Imported nx-X11-3.1.0-1.tar.gznx-X11/3.1.0-1Reinhard Tartler2011-10-101-0/+1665
Summary: Imported nx-X11-3.1.0-1.tar.gz Keywords: Imported nx-X11-3.1.0-1.tar.gz into Git repository