aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
Commit message (Collapse)AuthorAgeFilesLines
* Use NXAGENT_ONSTART define at more locationsUlrich Sibiller2021-06-081-0/+2
| | | | | marking all the code that is not really required when not using nomachine's nxclient.
* Reconnect.c: fix possible realloc() memory lossUlrich Sibiller2021-01-151-2/+6
| | | | | | "V701 realloc() possible leak: when realloc() fails in allocating memory, original pointer 'nxagentReconnectErrorMessage' is lost. Consider assigning realloc() to a temporary pointer."
* nxagent: make nxagentXkbState.Initialized a BooleanUlrich Sibiller2021-01-151-1/+1
|
* nxagent: improve Boolean handling for Reconnect functionsUlrich Sibiller2021-01-151-13/+13
|
* nxagent: rework some Boolean checksUlrich Sibiller2021-01-151-1/+1
| | | | | nxagentWindowTopLevel() and nxagentNeedConnectionChange() return Boolean nxagentPixmapIsVirtual() and nxagentIsShmPixmap(), too.
* nxagent: make nxagentVerbose a BooleanUlrich Sibiller2021-01-151-2/+2
|
* nxagent: make Desktop, Rootless and Binder options Booleans (again)Ulrich Sibiller2021-01-151-1/+1
| | | | | They have been changed to tri-state variables (1, 0 and UNDEFINED) between nxagent 1.5.0-90 and -93, for no obvious reason.
* nxagent: treat several nxagentOptions as real BooleansUlrich Sibiller2021-01-151-3/+3
| | | | | | | Adaptive, Composite, DeviceControl, DeviceControlUserDefined, IgnoreVisibility, InhibitXkb, Nested, Menu, MagicPixel, Persistent, Reset, ResetzKeyboardAtResume, SharedMemory, SharedPixmaps, Streaming, UseDamage, ViewOnly, Xdmcp, Xinerama
* nxagent: Prevent resize loopUlrich Sibiller2020-10-171-1/+1
| | | | | | This only happened with certain window managers like mutter. Fixes ArcticaProject/nx-libs#925
* Reconnect.c: save some linesUlrich Sibiller2020-05-071-14/+1
|
* Reconnect.c: reformat commentsUlrich Sibiller2020-05-071-20/+14
|
* Reconnect.c: reformat saveAgentState()Ulrich Sibiller2020-05-071-5/+4
|
* NXdispatch.c, Reconnect.c: fix format specifiersUlrich Sibiller2020-05-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | Fix these warnings with NX_DEBUG_INPUT enabled: NXdispatch.c: In function ‘Dispatch’: NXdispatch.c:350:74: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘CARD32’ {aka ‘unsigned int’} [-Wformat=] fprintf(stderr, "Session: Session started at '%s' timestamp [%lu].\n", ~~^ %u GetTimeAsString(), GetTimeInMillis()); Reconnect.c: In function ‘nxagentHandleConnectionStates’: Reconnect.c:303:74: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘CARD32’ {aka ‘unsigned int’} [-Wformat=] fprintf(stderr, "Session: Session suspended at '%s' timestamp [%lu].\n", GetTimeAsString(), GetTimeInMillis()); ~~^ ~~~~~~~~~~~~~~~~~ %u Reconnect.c: In function ‘nxagentReconnectSession’: Reconnect.c:673:66: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘CARD32’ {aka ‘unsigned int’} [-Wformat=] fprintf(stderr, "Session: Session resumed at '%s' timestamp [%lu].\n", GetTimeAsString(), GetTimeInMillis()); ~~^ ~~~~~~~~~~~~~~~~~ %u
* nxagent: make all traps BooleansUlrich Sibiller2020-05-071-1/+1
| | | | and use True/False instead of 1/0
* nxagent: re-implement timeout handlingUlrich Sibiller2020-04-071-0/+3
| | | | | | Option -timeout used the screensaver facility. This patch changes that to an own timer that is independent. This effectly means we can drop most of the derived screensaving stuff in a follow-up commit.
* Cursor.c: drop unused return code for nxagentDisconnectAllCursorUlrich Sibiller2020-01-091-1/+1
|
* Pixmap.c: fix variable shadowingUlrich Sibiller2020-01-091-0/+1
| | | | | | | | | | | | | | | | | Pixmap.c: In function ‘nxagentDisconnectAllPixmaps’: Pixmap.c:677:19: warning: declaration of ‘r’ shadows a previous local [-Wshadow=compatible-local] for (int i = 0, r = 1; i < MAXCLIENTS; r = 1, i++) ^ Pixmap.c:652:7: note: shadowed declaration is here int r = 1; ^ Pixmap.c: In function ‘nxagentReconnectAllPixmaps’: Pixmap.c:840:19: warning: declaration of ‘result’ shadows a previous local [-Wshadow=compatible-local] for (int i = 0, result = 1; i < MAXCLIENTS; result = 1, i++) ^~~~~~ Pixmap.c:807:8: note: shadowed declaration is here Bool result = 1; ^~~~~~
* Reconnect.c: fix typosUlrich Sibiller2020-01-061-1/+1
|
* nxagent: remove additional keyboard handling from Reconnect.cUlrich Sibiller2020-01-051-17/+22
| | | | | | | | At reconnect we check if a keyboard reset is required. If so, we are calling the corresponding code from Keyboard.c. No explicit keyboard code in Reconnect.c required. fixes ArcticaProject/nx-libs#886
* nxagent: central check for keyboard clone modeUlrich Sibiller2020-01-051-9/+0
|
* Splash.c: nxagentRemoveSplashWindow: drop unused parameterUlrich Sibiller2019-08-271-1/+1
|
* Reconnect.c: use SAFE_freeUlrich Sibiller2019-08-061-7/+5
|
* Reconnect.c: initialize stateFile pathUlrich Sibiller2019-05-101-1/+1
| | | | We check that via strlen() while never properly initializing it.
* Revert "nxagent: rework Bool handling"Ulrich Sibiller2019-02-151-5/+5
| | | | | | | | | | | | This reverts commit 16cd2bbe1c4425e3fa557f9ca0723aa94a50b071. It turned out that I had missed some of the Booleans being actually tristate variables. I think I can fix this (they do not need to be tristate) but I revert this for now to get back to a working state (there are reports about non-working fullscreen mode and reconnect problems). Refers to ArcticaProject/nx-libs#772
* nxagent: rework Bool handlingUlrich Sibiller2019-02-111-5/+5
| | | | drop "== False", "== 0", "== True" and "== 0" for nxagentOptions and Traps
* nxagent: bypass X2go's keyboard configuration hackUlrich Sibiller2018-12-191-0/+10
| | | | | | | | | | | | If X2go runs in auto keyboard mode it will pass keyboard=null/null to the agent and set the keyboard afterwards with setxkbmap. This patch lets nxagent handle that situation internally (null/null will be interpreted as clone) and disables X2go's mechanism (by creating a dir that effectively blocks it; see x2gosetkeyboard) This is only activated if the agent is run as "x2goagent". Fixes ArcticaProject/nx-libs#368
* nxagent: simplify keycode conversion setupUlrich Sibiller2018-12-191-1/+1
|
* nxagent: store remote keyboard in global variablesUlrich Sibiller2018-12-191-0/+3
| | | | This avoids some roundtrips.
* nxagent: add keyboard=clone configuration optionUlrich Sibiller2018-12-191-1/+2
| | | | | | | | | | | | | | | | Specifying -keyboard clone (or keyboard=clone in options) will clone XKB keyboard from the remote x server. This way many keyboard problems will hopefully never return... Should be the default but is not (yet) for compatibility reasons. Fixes ArcticaProject/nx-libs#373 (except the "do autoconf if no keyboard is provided" feature.) References: ArcticaProject/nx-libs#240 ArcticaProject/nx-libs#368
* Reconnect.c: restore old keyboard value if no new one is givenUlrich Sibiller2018-12-191-0/+11
| | | | | | | It may not fully fix the issue mentioned below but it does for the -keyboard commandline option at least. Fixes ArcticaProject/nx-libs#741
* nxagent: use nxagentWMIsRunning as Bool all over the placeUlrich Sibiller2018-10-221-1/+1
| | | | | | has been used as integer sometimes (technically correct, but not nice) Fixes ArcticaProject/nx-libs#698
* nxagent: remove mmwidth/mmheight from nxagentChangeScreenConfigUlrich Sibiller2018-05-241-1/+1
| | | | Was 0,0 on every call...
* hw/nxagent/: Use <function>(void) rather than <function>().Mike Gabriel2018-02-261-2/+2
|
* Reconnect.c: Fix wrong function names in TEST outputUlrich Sibiller2018-02-051-10/+10
|
* Dialog.c,Display.c,NXdixfonts.c: replace strncpy() by snprintf where appropriateUlrich Sibiller2018-01-071-1/+1
|
* simply free() callsUlrich Sibiller2017-11-211-12/+4
| | | | free() can handle NULL so there's no need to check this ourselves
* Fix options parsing on reconnectUlrich Sibiller2017-11-181-2/+2
| | | | | | Commit 3f7b3001988bf921e6cd860f03a6256b1451ee3d was incomplete: the options parameter was not parsed as a string on reconnect. It was always assumed to be a filename.
* rename nxagentOptionFile to nxagentOptionsFilenameUlrich Sibiller2017-07-241-2/+2
|
* pass filename as parameter to nxagentProcessOptionsFile()Ulrich Sibiller2017-07-231-1/+3
| | | | Do not use global variables where it is not necessary.
* Init keystrokes at startup and reconnectUlrich Sibiller2017-04-031-0/+5
| | | | no more late initialization
* nxcompext: Move code into Xserver subtree, as nxcompext requires Xserver ↵Mike Gabriel2016-11-151-1/+1
| | | | | | includes at build time. Fixes ArcticaProject/nx-libs#276.
* Reconnect.c: simplify code by using strndupUlrich Sibiller2016-11-081-12/+4
| | | | Also abort reconnect on strndup failure.
* Per-file copyright notices: Update copyright information in file headers ↵Mike Gabriel2016-07-061-7/+15
| | | | that NoMachine placed there own copyright statement in.
* nx-X11/programs/Xserver: Drop {X,x}alloc() macros, use malloc() instead.Mike Gabriel2016-07-021-12/+12
|
* nx-X11/programs/Xserver: Drop {X,x}free() macros, use free() instead.Mike Gabriel2016-07-021-3/+3
| | | | Fixes ArcticaProject/nx-libs#105
* nx-X11/programs/Xserver: Include nxcomp{,ext,shad} headers like one would do ↵Mike Gabriel2016-06-131-3/+3
| | | | with system-wide shared libraries.
* Provide support for re-enabling Xinerama on session resumptions.Mike Gabriel2015-12-301-1/+1
| | | | | | | | | | | | | | By design, when resuming a session, Xinerama can only be re-enabled by NX option parsing. Thus, this change introduces a "xinerama" NX option that can be loaded via an options file into NX agent when resuming a session. The new xinerame NX session option also allows switching on Xinerama at session startup via an option file. When implementing the new NX Xinerama support into clients (like TheQVD, X2Go Client, etc., this new xinerama NX option should be used for activating Xinerama in the NX / QVD / X2Go session.
* Save session state in file.Oleksandr Shneyder2015-02-101-0/+33
| | | | | | | | | 210_nxagent_save_session_state.full.patch 210_nxcomp_save_session_state.full+lite.patch This patch adds a "state" option to NX (agent) which allows one to specify a file where nxagent will write its session state into.
* Imported nxagent-3.5.0-9.tar.gznxagentMike Gabriel2012-05-221-3/+2
| | | | | | | | Summary: Imported nxagent-3.5.0-9.tar.gz Keywords: Imported nxagent-3.5.0-9.tar.gz into Git repository
* Imported nxagent-3.5.0-5.tar.gznxagent/3.5.0-5Reinhard Tartler2011-10-101-1/+2
| | | | | | | | Summary: Imported nxagent-3.5.0-5.tar.gz Keywords: Imported nxagent-3.5.0-5.tar.gz into Git repository