aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
Commit message (Collapse)AuthorAgeFilesLines
* rework xkb device private handlingUlrich Sibiller2019-06-221-8/+0
| | | | | | | 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).
* Keyboard.c: use existing define instead of hardcoced valueUlrich Sibiller2019-06-221-1/+1
|
* Keyboard.c: fix another cppcheck findingUlrich Sibiller2019-06-221-1/+2
| | | | [Keyboard.c:559]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour
* Keyboard.c: rearrange code to make cppcheck happyUlrich Sibiller2019-06-221-1/+4
| | | | Otherwise it will (falsely) report "Memory pointed to by 'sessionpath' is freed twice."
* Keyboard.c: fix three memory leaksUlrich Sibiller2019-06-221-0/+4
| | | | | | | | | | | | | | | | | | | | | ==12976==ERROR: LeakSanitizer: detected memory leaks Direct leak of 6 byte(s) in 1 object(s) allocated from: #0 0x7f510b3ac810 in strdup (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x3a810) #1 0x559ca29c5035 in nxagentKeyboardProc /home/uli/work/nx/ArcticaProject/nx-libs/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c:866 #2 0x7a29bff07 (<unknown module>) Direct leak of 1 byte(s) in 1 object(s) allocated from: #0 0x7f510b3ac810 in strdup (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x3a810) #1 0x559ca29c509a in nxagentKeyboardProc /home/uli/work/nx/ArcticaProject/nx-libs/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c:870 #2 0x7a29bff07 (<unknown module>) Direct leak of 1 byte(s) in 1 object(s) allocated from: #0 0x7f510b3ac810 in strdup (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x3a810) #1 0x559ca29c507f in nxagentKeyboardProc /home/uli/work/nx/ArcticaProject/nx-libs/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c:869 #2 0x7a29bff07 (<unknown module>) SUMMARY: AddressSanitizer: 8 byte(s) leaked in 3 allocation(s).
* various scope improvementsUlrich Sibiller2019-06-191-3/+1
|
* Fix memleaks: Free devPrivates of devices on shutdownUlrich Sibiller2019-06-191-1/+8
| | | | | | | | | | | | | | | | | | | | | | Fixes these two memory leaks identified by valgrind: ==28336== 32 (8 direct, 24 indirect) bytes in 1 blocks are definitely lost in loss record 180 of 308 ==28336== at 0x48356AF: malloc (vg_replace_malloc.c:298) ==28336== by 0x4837DE7: realloc (vg_replace_malloc.c:826) ==28336== by 0x1AE322: AllocateDevicePrivate (privates.c:439) ==28336== by 0x27527B: XkbSetExtension (xkbActions.c:72) ==28336== by 0x198E9B: _RegisterPointerDevice (devices.c:361) ==28336== by 0x1DBA35: InitInput (Init.c:440) ==28336== by 0x14DBD6: main (main.c:303) ==28336== ==28336== 32 (8 direct, 24 indirect) bytes in 1 blocks are definitely lost in loss record 181 of 308 ==28336== at 0x48356AF: malloc (vg_replace_malloc.c:298) ==28336== by 0x4837DE7: realloc (vg_replace_malloc.c:826) ==28336== by 0x1AE322: AllocateDevicePrivate (privates.c:439) ==28336== by 0x27527B: XkbSetExtension (xkbActions.c:72) ==28336== by 0x198F1B: _RegisterKeyboardDevice (devices.c:384) ==28336== by 0x1DBA3D: InitInput (Init.c:441) ==28336== by 0x14DBD6: main (main.c:303)
* Keyboard.c: nullify freed pointersUlrich Sibiller2019-06-191-7/+11
| | | | | | | While trying to properly free memory allocated by XKB I accidently called nxagentFreeKeyboardDeviceData twice and noticed it would cause a segfault here. As the other pointers are also nullified after being freed let's just do it here, too.
* nxagent: make nxagentX2go a BooleanUlrich Sibiller2019-05-101-3/+3
|
* Keyboard.c: clean/unify formattingUlrich Sibiller2019-05-101-13/+19
|
* Keyboard.c: improve TEST and DEBUG outputUlrich Sibiller2019-05-101-2/+3
|
* Keyboard.c: fix comment.Mike Gabriel2019-02-181-2/+1
|
* Revert "nxagent: rework Bool handling"Ulrich Sibiller2019-02-151-4/+4
| | | | | | | | | | | | 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-4/+4
| | | | drop "== False", "== 0", "== True" and "== 0" for nxagentOptions and Traps
* nxagent: bypass X2go's keyboard configuration hackUlrich Sibiller2018-12-191-31/+80
| | | | | | | | | | | | 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
* Keyboard.c: add static keyword where appropriateUlrich Sibiller2018-12-191-5/+5
|
* nxagent: simplify keycode conversion setupUlrich Sibiller2018-12-191-14/+5
|
* nxagent: store remote keyboard in global variablesUlrich Sibiller2018-12-191-111/+102
| | | | This avoids some roundtrips.
* nxagent: add additional keyboard config option rmlvoUlrich Sibiller2018-12-191-5/+29
| | | | Add possibility to pass more than model and layout via the keyboard parameter.
* nxagent: add keyboard=clone configuration optionUlrich Sibiller2018-12-191-5/+34
| | | | | | | | | | | | | | | | 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
* Keyboard.c: remove non-fitting commentUlrich Sibiller2018-12-191-6/+0
| | | | Describes a check we are not doing here anymore...
* Keyboard.c: improve creation of keyboard config fileUlrich Sibiller2018-12-191-16/+28
| | | | | | | | It will now create better working config files. References: ArcticaProject/nx-libs#239 ArcticaProject/nx-libs#368
* Keyboard.c: reformat nxagentKeycodeConversionSetupUlrich Sibiller2018-12-191-19/+18
|
* Keyboard.c: use 'variant' all over the placeUlrich Sibiller2018-12-191-4/+4
| | | | avoid mix of 'variant' and 'variants'
* Keyboard.c: rename variables to better reflect their meaningUlrich Sibiller2018-12-191-25/+25
|
* Keyboard.c: refactor keycode conversionUlrich Sibiller2018-12-191-38/+56
| | | | we'll need the remote xkb in KeyboardProc in future so let's move it up.
* Keyboard.c: move keyboard file creation to extra functionUlrich Sibiller2018-12-191-51/+57
|
* Keyboard.c: simplify even more: free stuff at one placeUlrich Sibiller2018-11-091-16/+8
|
* Keyboard.c: fix keyboard=query logicUlrich Sibiller2018-11-091-1/+1
| | | | an empty nxagentKeyboard variable is no reason to fall back to no-XKB mode
* Keyboard.c: greatly simplify the code in nxagentKeyboardProcUlrich Sibiller2018-11-091-31/+13
| | | | most of the code was existing twice
* Keyboard.c: guard XkbFreeKeyboard callsUlrich Sibiller2018-11-091-5/+10
| | | | manpage does not tell us if NULL is valid
* Keyboard.c: simplify over-specific ifUlrich Sibiller2018-11-091-2/+1
|
* Keyboard.c: simplify RLMVO string handlingUlrich Sibiller2018-11-091-37/+9
|
* Keyboard.c: always ask for remote XKBUlrich Sibiller2018-11-091-12/+12
|
* Keyboard.c: do not define own RLMVO defaultsUlrich Sibiller2018-11-091-94/+5
| | | | use the ones from xkb
* no more own XkbBaseDirectory handlingUlrich Sibiller2018-11-091-33/+0
| | | | Just use the existing xkb code
* Keyboard.c: remove unused definesUlrich Sibiller2018-11-091-6/+0
| | | | Defines regarding XKB-BASE_DIRECTORY are used only xkb.
* Keyboard.c: remove unnecessary includesUlrich Sibiller2018-11-091-7/+0
|
* Keyboard.c: Remove (now) unused definesUlrich Sibiller2018-11-091-6/+0
|
* Lift xkb to XORG-1.2.0 stateUlrich Sibiller2018-11-091-1/+1
|
* Xserver/xkb: Remove -xkbmap argument.Daniel Stone2018-07-031-11/+0
| | | | | | | | | | | | Backported from X.org: commit fd8bde8bb0f9d796b3464973b53285c0a6d22a31 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon May 29 11:14:03 2006 +0000 Remove -xkbmap argument. Backported-to-NX-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* hw/nxagent/Keyboard.c: Drop support for loading XKB config from file.Mike Gabriel2018-07-031-97/+7
| | | | | | * Support for XkbCF has been dropped in XKB extension by X.org * Has never been used in recent NXv3 implementations (e.g. X2Go) * Config file parsing is error prone, use setxkbmap API instead
* Some small Keyboard.c improvementsUlrich Sibiller2018-07-031-4/+4
| | | | as in xorg-xserver upstream's hw/xnest/Keyboard.c
* hw/nxagent/: Use <function>(void) rather than <function>().Mike Gabriel2018-02-261-1/+1
|
* Keyboard.c: rework string allocation/buildingUlrich Sibiller2018-01-071-14/+10
|
* Keyboard.c: replace malloc + strcpy by asprintfUlrich Sibiller2018-01-071-6/+4
|
* Keyboard.c: improve user messages for keyboard file handlingUlrich Sibiller2018-01-071-1/+1
|
* Keyboard.c: fix memory leakUlrich Sibiller2018-01-071-1/+3
|
* Keyboard.c: Replace some memsets by zero initializationUlrich Sibiller2017-12-141-6/+3
|
* Keyboard.c: Fix indentationUlrich Sibiller2017-12-141-13/+13
|