aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/dix
Commit message (Collapse)AuthorAgeFilesLines
* NXextension.c: use ProcListExtensions() from dixUlrich Sibiller2019-11-021-2/+0
|
* NXextension.c: use ProcQueryExtension() from dixUlrich Sibiller2019-11-021-1/+1
|
* NXevents.c: use XYToWindow from dixUlrich Sibiller2019-11-011-3/+12
| | | | add a callback to determine the starting window.
* NXevents.c: call upstream ProcAllocEvents()Ulrich Sibiller2019-11-011-0/+4
| | | | | Our version only adds some commented code, so it is not really necessary. But it is cleaner to handle it that way.
* NXevents.c: call upstream DefineInitialRootWindow()Ulrich Sibiller2019-11-011-2/+4
|
* NXevents.c: call upstream version of ProcSendEvent()Ulrich Sibiller2019-11-011-2/+4
|
* NXevents.c: call upstream versions of (De)ActivatePointerGrab()Ulrich Sibiller2019-11-011-3/+10
|
* NXproperty.c: prevent deletion of NX_AGENT_VERSION propertyUlrich Sibiller2019-09-291-0/+2
| | | | Fixes ArcticaProject/nx-libs#825
* Update currentTime in dispatch loopUlrich Sibiller2019-09-291-0/+3
| | | | | | | | | | | | | | | | | | commit 312910b4e34215aaa50fc0c6092684d5878dc32f Author: Chase Douglas <chase.douglas@canonical.com> Date: Wed Apr 18 11:15:40 2012 -0700 Update currentTime in dispatch loop A request, like input device grabs, may check a request timestamp against currentTime. It is possible for currentTime to lag a previously sent event timestamp. If the client makes a request based on such an event timestamp, the request may fail the validity check against currentTime unless we always update the time before processing the request. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
* nxagent: drop nxagentRootTileWindowUlrich Sibiller2019-08-271-2/+0
| | | | | | | | We either use a solid black or a white background and no backround pixmap. So nxagentRootTileWindow is always empty and we can drop all stuff around it. remove nxagentSplashCount, too, since it is no longer checked anywhere.
* 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).
* dix/dispatch: fix a small memory leakUlrich Sibiller2019-06-221-0/+3
|
* 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>
* Remove the Must_have_memory hack.Ulrich Sibiller2019-06-121-17/+8
| | | | | | | | | | | | | We are not using any alloc function that respects that variable, so lets drop it. Backport of this commit: commit 0ce61e21d6d7dcca0090e319bbcdb678570f2c3f Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 16:05:19 2008 -0400 Remove the Must_have_memory hack. Also remove an astonishing amount of misunderstanding of how casts work.
* NXdispatch.c: use upstream version of ProcSetSelectionOwnerUlrich Sibiller2019-06-111-2/+0
|
* Fix NXevents.c: Reactivate errornously commented functionUlrich Sibiller2019-06-111-0/+4
| | | | | | | | | CheckMotion() had been commented in add881931f2e702fb1952f4e1baba04b3dc536ee as it looked identical to the version from dix/events.c except for some commented code. But this based (probably) on a thinko - code that had been disabled by NX became active again this way. Fix this by removing the comments and by adding #ifdef/else to emphasize the difference.
* dix: remove unused requestLogIndexUlrich Sibiller2019-05-291-9/+0
| | | | | | | | | | | | | | | | | | | | | As done in these commits: commit 6583477035234e23ead2fad9db7a07e5862447a4 Author: Nicolai Hähnle <nhaehnle@gmail.com> Date: Sat May 23 13:35:24 2009 +0200 Remove reference to non-existing requestLog and requestLogIndex These fields were removed in 252ec504817e05b185e4896a2d899e9c00b8aeef. Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 252ec504817e05b185e4896a2d899e9c00b8aeef Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 30 15:18:30 2009 -0400 Document which bits of ClientRec are currently unused
* Fix uninitialized bytesUlrich Sibiller2018-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | Fixes this valgrind finding ==16977== Warning: invalid file descriptor -1 in syscall close() ==16977== Conditional jump or move depends on uninitialised value(s) ==16977== at 0x544B6B: XkbSendNewKeyboardNotify (xkbEvents.c:62) ==16977== by 0x540481: ProcXkbGetKbdByName (xkb.c:5330) ==16977== by 0x4341C5: Dispatch (NXdispatch.c:482) ==16977== by 0x40EB02: main (main.c:353) ==16977== Uninitialised value was created by a heap allocation ==16977== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==16977== by 0x431BD7: NextAvailableClient (dispatch.c:3719) ==16977== by 0x47B297: AllocNewConnection (connection.c:821) ==16977== by 0x47B297: EstablishNewConnections (connection.c:910) ==16977== by 0x463DFE: ProcessWorkQueue (dixutils.c:541) ==16977== by 0x47635E: WaitForSomething (WaitFor.c:213) ==16977== by 0x434089: Dispatch (NXdispatch.c:360) ==16977== by 0x40EB02: main (main.c:353)
* Fix some memory leaks.Mario Trangoni2018-07-031-0/+1
|
* dixfonts.c: use calloc for LFclosurePtrMike Gabriel2018-07-031-1/+1
| | | | ... to keep dix/dixfonts and hw/nxagnet/NXdixfonts.c in sync.
* dix/dixfonts.c: free() can handle NULLMike Gabriel2018-07-031-8/+6
| | | | so let's remove some superflous tests
* 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
* Do not reset lastDeviceEventTime when we do dixSaveScreensRichard Hughes2018-07-031-2/+0
| | | | | | | | | | | | | | | | | Backported from X.org's Xserver: commit 6b5978dcf1f7ac3ecc2f22df06f7000f360e2066 Author: Richard Hughes <richard@hughsie.com> Date: Mon Aug 17 09:15:32 2009 +0100 Do not reset lastDeviceEventTime when we do dixSaveScreens When we turn off DPMS with DPMSModeOff and do dixSaveScreens, don't reset the event time else session clients using IDLETIME will be reset. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* Lift dix to xorg-xserver-1.3.0.0 state - non-functional changes onlyUlrich Sibiller2018-02-263-8/+4
|
* Lift dix to xorg-xserver-1.3.0.0 stateUlrich Sibiller2018-02-2611-71/+164
|
* Lift dix to xorg-xserver-7.1/1.1.0 state - non-functional changes onlyUlrich Sibiller2018-02-263-1/+24
|
* Lift dix to xorg-xserver-7.1/1.1.0 stateUlrich Sibiller2018-02-265-8/+47
|
* Xext: lift DPMS extension to xorg-xserver-7.1/1.1 stateUlrich Sibiller2018-02-071-6/+0
|
* Xext: lift screensaver extension to XORG-7_1 stateUlrich Sibiller2018-02-072-1/+5
|
* reduce usage of uninitialised bytesUlrich Sibiller2017-12-284-52/+43
| | | | as reported by valgrind
* Support building with legacy (pre-1.4.2) libXfont(1) versions.Mihai Moldovan2017-12-161-0/+6
| | | | | | | | Partly reverts ec30a857eb0d67b232f8d43e63a6370023f4c4d0, but in a forward-compatible manner. Legacy libXfont1 versions are automatically detected by the main Makefile.
* 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>
* Clearing comments from $XFree86$ (et al.) header lines.Mike Gabriel2017-04-191-1/+0
|
* Regression fix for added libXfont2 API support:Mike Gabriel2017-04-101-3/+1
| | | | | | | | | | - Move FONT_DEFINES and XLIBFONT definition to from Server.tmpl to Imake.tmpl. - Add FONT_DEFINES to ALLDEFINES. - Drop SpecialCObjectRules with FONT_DEFINES from various Imakefiles again, FONT_DEFINES is now set "globally". - Hand over FONT_DEFINES from main Makefile to nx-X11's make BuildEnv to make gccmakedep happy.
* Add CreatePixmap allocation hints.Aaron Plattner2017-04-105-6/+7
| | | | | | | | | | | | | | | | Backported from X.org: commit f2e310132fbe1520c1b5f3da4faa2d2d47835e72 Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Oct 31 14:15:35 2007 -0700 Add CreatePixmap allocation hints. These hints allow an acceleration architecture to optimize allocation of certain types of pixmaps, such as pixmaps that will serve as backing pixmaps for redirected windows. Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* Xserver: Support building against libXfont2 (v2) API and old libXfont(1) API ↵Mike Gabriel2017-04-104-3/+389
| | | | | | | | | | | | | | | | | | | | | | | | alike. Fixes ArcticaProject/nx-libs#296. Inspired by the following X.org commit. Other than X.org, we will continue support for building nx-libs against libXfont1 for a while. commit 05a793f5b3c40747d5a92a076def7f4fb673c7e7 Author: Keith Packard <keithp@keithp.com> Date: Tue Sep 1 18:50:55 2015 -0700 dix: Switch to the libXfont2 API (v2) This new libXfont API eliminates exposing internal X server symbols to the font library, replacing those with a struct full of the entire API needed to use that library. v2: Use libXfont2 instead of libXfont_2 Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
* SetFontPath: set client->errorValue on failure.Jamey Sharp2017-04-103-10/+6
| | | | | | | | | | | | | | | | | | | | | | | Backported from X.org: commit 21ceae9002c6364deb3d074cf2da7d3864cf6879 Author: Jamey Sharp <jamey@minilop.net> Date: Tue May 11 10:24:00 2010 -0700 SetFontPath: set client->errorValue on failure. Previously the callers were only setting errorValue on Success, when it's ignored, and leaving it alone on failure, when it's sent to the client. Since SetFontPath takes the ClientPtr, let it set client->errorValue instead of letting the callers continue to get it wrong. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* dix: pass a valid ClientPtr to SetFontPath in all cases.Eamon Walsh2017-04-101-1/+1
| | | | | | | | | | | | Backported from X.org: commit 7e9e01a4a34fa45521067d43c5bbff942dd5d51a Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 10 17:40:22 2007 -0400 dix: pass a valid ClientPtr to SetFontPath in all cases. Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* dix: Move InitFonts up above screen initializationMike Gabriel2017-04-102-2/+3
| | | | | | | | | | | | | | | | | | | | | Backport from X.org: commit 91ea0965dd4dfeba0a914c47ad4a64768e983b1b Author: Keith Packard <keithp@keithp.com> Date: Wed Nov 11 22:02:04 2015 -0800 dix: Move InitFonts up above screen initialization Font initialization was split into two stages, the first was to set up font privates with a call to ResetFontPrivateIndex, then much later the call to InitFonts to set up all of the FPEs. Doing the full font initialization before initializing the video drivers means that we can move the call to ResetFontPrivateIndex inside InitFonts. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* Revert "regression fix for 52872a0: Keep index parameter in AddScreen() for ↵Mike Gabriel2017-04-101-3/+2
| | | | | | | | | | now. Requires proper ABI backport. (was: copy+paste error)." This reverts commit 342758254b1b8507c9ec774f40d8ec62baf394a8. Other than stated in the original commit msg, both regressions are related to inproper rebasing of two pull requests touch the same code portion.
* xserver: remove index from CloseScreen (API/ABI breakage)Dave Airlie2017-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extracted from X.org bulk commit: commit 1f0e8bd5eb1a5539689cfc4f5a6b86b530907ec5 Author: Dave Airlie <airlied@redhat.com> Date: Tue Jun 5 13:22:18 2012 +0100 api: rework the X server driver API to avoid global arrays. This is a squash merge containing all the API changes, as well as the video ABI bump. Its been squashed to make bisection easier. Full patch log below: [...] commit 06729dbbc804a20242e6499f446acb5d94023c3c Author: Dave Airlie <airlied@gmail.com> Date: Tue Apr 10 14:04:59 2012 +0100 xserver: remove index from CloseScreen (API/ABI breakage) This drops the index from the CloseScreen callback, its always been useless really, since the pScreen contains it. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* regression fix for 52872a0: Keep index parameter in AddScreen() for now. ↵Mike Gabriel2017-03-271-2/+3
| | | | Requires proper ABI backport. (was: copy+paste error).
* dix: Remove insane BC hacksMike Gabriel2017-03-241-12/+1
| | | | | | | | | | | | | commit 6b5206e7cb8e5279816b48f014d47d3f03f16972 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 18 15:38:10 2008 +0300 dix: Remove insane BC hacks If your DDX needs a 1bpp mode and doesn't set it up, your DDX is incompetent. Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* Move AddScreen() comment where it actually belongs. Should be done in X.org, ↵Mike Gabriel2017-03-241-0/+7
| | | | too.
* dix: Move AddScreen() over into dispatch.c and introduce init_screen()Mike Gabriel2017-03-242-215/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Partially pruned out of X.org commits: commit 987579c930bda803427a28cb82773c389f5110d6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 22 13:26:40 2009 +1000 dix: remove all but main() from main.c All other functions are pushed into where they seemed to fit. main.c is now linked separately into libmain.a and linked in by the various DDXs. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3478af3374abffa0c226ee077fda1fcfc0751e74 Author: Dave Airlie <airlied@redhat.com> Date: Tue Jun 5 17:01:21 2012 +0100 screen: split out screen init code. (v2) This is a precursor for reusing this code to init gpu screens. v2: fixup int check as per Keith's review. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* Handle -displayfd and an explicit display number sensiblyJon TURNEY2017-03-211-1/+2
| | | | | | | | | | | | | | | | | | | commit bc348bd2c42f3f18786085ccef2f010eff5bf3d2 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Mar 11 14:34:32 2013 +0000 Handle -displayfd and an explicit display number sensibly Handle -displayfd and an explicit display number sensibly, e.g. use the explicitly specified display number, and write it to the displayfd v2: displayfd might be 0, so use -1 as invalid value v3: Rebase for addition of NoListenAll flag Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* os: Add -displayfd optionChase Douglas2017-03-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | commit 88bacc49f06da5927f716869f5a32672a8297ed0 Author: Chase Douglas <chase.douglas@canonical.com> Date: Wed Apr 4 15:29:42 2012 -0700 os: Add -displayfd option This option specifies a file descriptor in the launching process. X will scan for an available display number and write that number back to the launching process, at the same time as SIGUSR1 generation. This means display managers don't need to guess at available display numbers. As a consequence, if X fails to start when using -displayfd, it's not because the display was in use, so there's no point in retrying the X launch on a higher display number. Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Tested-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* Move SIGUSR1 notification as late as possible.Adam Jackson2017-03-211-0/+2
| | | | | | | | | | | | | | | | | | commit f01e149d1af14ef9ee0e8a6743ab6a08f3bb677c Author: Adam Jackson <ajax@redhat.com> Date: Thu Nov 1 15:41:11 2007 -0400 Move SIGUSR1 notification as late as possible. If we inherited a signal mask from the parent process that ignores SIGUSR1, then we will send SIGUSR1 to the parent to indicate when we're ready to accept connections. Unfortunately, we send this notification way too early, right after creating the sockets rather than just before entering the main loop. Move it to just before Dispatch() so we're not lying quite so much. Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* dix: Extend initial connection handshake for forwarding proxiesAdam Jackson2017-03-211-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | commit 78fa121f4097d29458e5453c13473595df06e26e Author: Adam Jackson <ajax@redhat.com> Date: Fri Jun 17 13:43:38 2011 -0400 dix: Extend initial connection handshake for forwarding proxies Forwarding proxies like sshd will appear to be local, even though they aren't really. This leads to weird behaviour for extensions that truly require running under the same OS services as the client, like MIT-SHM and DRI2. Add two new legal values for the initial connection's byteOrder field, 'r' and 'R'. These act like 'l' and 'B' respectively, but have the side effect of forcing the client to be treated as non-local. Forwarding proxies should attempt to munge the first packet of the connection accordingly; older servers will reject connections thusly munged, so the proxy should fall back to passthrough if the munged connection attempt fails. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com> Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>