aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Clipboard.c: add FIXMEsUlrich Sibiller2021-06-201-0/+4
|
* Clipboard.c: add some more selection atomsUlrich Sibiller2021-06-201-13/+128
| | | | | we currently do not support them but as they require a special treatment we need to know them and report an error if they appear.
* Clipboard.c: target forwarding (Part 2/2)Ulrich Sibiller2021-06-201-110/+98
| | | | | | Internal clients asking for the available targets for a selection will no longer get a predefined list but a the list of targets from the owning client on the real X server.
* Clipboard.c: target forwarding (Part 1/2)Ulrich Sibiller2021-06-201-180/+118
| | | | | | Clients on the real X server requesting the available targets for a selection will no longer get a predefined list but a the list of targets from the owning internal client.
* Clipboard.c: fix: use XlibWindow instead of WindowUlrich Sibiller2021-06-201-17/+17
|
* Clipboard.c: fix type in status outputUlrich Sibiller2021-06-201-2/+2
|
* Clipboard.c: avoid superflous atom conversionUlrich Sibiller2021-06-201-6/+4
|
* Atoms.c: ensure to always return a valid string...Ulrich Sibiller2021-06-201-50/+49
| | | | | | ... by providing NameFor(Int|Rem)Atom() macros This way we do not have to validate it at various other places.
* Clipboard.c: make use of the new helpers from Atoms.cUlrich Sibiller2021-06-201-113/+50
| | | | | This saves us from having to create intermediate strings and Xfreeing them again. Which can easily be forgotten, producing memleaks.
* Clipboard.c: compact clipboard status outputUlrich Sibiller2021-06-201-45/+48
| | | | require less lines
* Clipboard.c: fix comment position and init array pointerUlrich Sibiller2021-06-201-2/+3
|
* Clipboard.c: drop clientCLIPBOARDUlrich Sibiller2021-06-201-14/+14
| | | | read the value from the intSelAtoms array instead
* Clipboard.c: move selection Atoms into separate arraysUlrich Sibiller2021-06-201-39/+49
| | | | | They really only change on startup and reconnect. Also with this change we now only have internal Atoms in the LastSelectionOwner array.
* Clipboard.c: rephrase FIXMEUlrich Sibiller2021-06-201-5/+11
|
* Clipboard.c: restructure request accumulation codeUlrich Sibiller2021-06-201-17/+22
|
* Clipboard.c: use for loops everywhere.Ulrich Sibiller2021-06-201-10/+13
|
* Clipboard.c: fix memleaks in DEBUG modeUlrich Sibiller2021-06-201-5/+15
|
* Clipboard.c: split if clauseUlrich Sibiller2021-06-201-3/+21
| | | | this allows better error messages
* Clipboard.c: remove superflous index determinationUlrich Sibiller2021-06-201-88/+84
| | | | we already have it at that stage
* Clipboard.c: always print SelectionCallBackKind in debug outputUlrich Sibiller2021-06-201-12/+26
|
* Clipboard.c: mark self-initiated eventUlrich Sibiller2021-06-201-0/+5
|
* Clipboard.c: rename function to better reflect meaningUlrich Sibiller2021-06-201-17/+12
| | | | Also improve Debug output.
* Clipboard.c: have lastServer* per selectionUlrich Sibiller2021-06-201-73/+110
| | | | This will help in PRIMARY content appearing in CLIPBOARD and vice versa.
* Clipboard.c: fix nxagentConvertSelectionUlrich Sibiller2021-06-201-22/+24
| | | | | | | - debug output was not printed at the beginning but later and was therefore missing sometimes - add comments/FIXMEs - re-enable failure notification for second call
* Clipboard.c: improve debug/test messagesUlrich Sibiller2021-06-201-4/+5
|
* Clipboard.c: simplify nxagentHandleSelectionRequestFromXServerUlrich Sibiller2021-06-201-120/+107
| | | | | | - remove redundant calls to nxagentFindLastSelectionOwnerIndex which reduce indentation level - scope improvements
* Clipboard.c: use index everywhereUlrich Sibiller2021-06-201-88/+87
|
* Clipboard.c: introduce translateLocalToRemote* helpersUlrich Sibiller2021-06-201-108/+90
| | | | | This also unifies target handling to never use TEXT or COMPOUND_TEXT (despite announcing it)
* Clipboard.c: rename selection fields to {int,rem}SelectionUlrich Sibiller2021-06-201-52/+88
| | | | This helps in avoiding storing the wrong value in a field.
* Clipboard.c: reformat for better readabilityUlrich Sibiller2021-06-201-23/+23
|
* Clipboard.c: improve function names once moreUlrich Sibiller2021-06-201-37/+37
|
* Clipboard.c: rework LastClient stuff to work _per selection_Ulrich Sibiller2021-06-201-224/+323
|
* Clipboard.c: catch selection failure from real X serverUlrich Sibiller2021-06-081-0/+8
|
* Clipboard.c: do not set stage to new value if already set to that valueUlrich Sibiller2021-06-081-0/+9
|
* Clipboard.c: print times unsignedUlrich Sibiller2021-06-081-4/+4
| | | | there are no negative times...
* Clipboard.c: improve explanations/FIXMEsUlrich Sibiller2021-06-081-1/+10
|
* Clipboard.c: improve debugging outputUlrich Sibiller2021-06-081-20/+36
|
* Clipboard.c: improve error messageUlrich Sibiller2021-06-081-20/+37
| | | | | | if we get an unexpected property print that as an error. Before we saw "unexpected stage" in that case which does not really help in debugging...
* Clipboard.c: add/fix commentsUlrich Sibiller2021-06-081-3/+6
|
* Use NXAGENT_ONSTART define at more locationsUlrich Sibiller2021-06-081-0/+3
| | | | | marking all the code that is not really required when not using nomachine's nxclient.
* nxagent: make nxagentXFixesInfo.Initialized a BooleanUlrich Sibiller2021-01-151-2/+2
|
* nxagent: treat all Traps as Booleans everywhereUlrich Sibiller2021-01-151-1/+1
|
* Clipboard.c: fix bug in special optimization for nested settingsUlrich Sibiller2020-11-041-2/+3
| | | | Fixes ArcticaProject/nx-libs#941
* Clipboard.c: add missing ifdefsUlrich Sibiller2020-11-031-0/+6
|
* Clipboard.c: fix missing )Ulrich Sibiller2020-11-031-1/+1
|
* nxagent: fix stack smashingUlrich Sibiller2020-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In compext Atom has the size of XlibAtom. Therefore calling functions of Compext.c requires to use/pass XlibAtom. Same for Window/XlibWindow. ==15438==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffffffcdc0 at pc 0x5555556a81b5 bp 0x7fffffffcd10 sp 0x7fffffffcd08 WRITE of size 8 at 0x7fffffffcdc0 thread T0 #0 0x5555556a81b4 in NXGetCollectedProperty nx-X11/programs/Xserver/hw/nxagent/compext/Compext.c:4124 #1 0x5555557d0488 in nxagentCollectPropertyEvent nx-X11/programs/Xserver/hw/nxagent/Clipboard.c:1202 #2 0x555555723340 in nxagentHandleCollectPropertyEvent nx-X11/programs/Xserver/hw/nxagent/Events.c:3923 #3 0x55555571d4db in nxagentHandleProxyEvent nx-X11/programs/Xserver/hw/nxagent/Events.c:3007 #4 0x55555571bb92 in nxagentHandleClientMessageEvent nx-X11/programs/Xserver/hw/nxagent/Events.c:2595 #5 0x555555717dfc in nxagentDispatchEvents nx-X11/programs/Xserver/hw/nxagent/Events.c:1827 #6 0x555555750813 in nxagentBlockHandler nx-X11/programs/Xserver/hw/nxagent/Handlers.c:437 #7 0x5555556c1b5d in BlockHandler nx-X11/programs/Xserver/dix/dixutils.c:403 #8 0x5555556d47ff in WaitForSomething nx-X11/programs/Xserver/os/WaitFor.c:232 #9 0x555555665b22 in Dispatch nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c:365 #10 0x5555555ed760 in main nx-X11/programs/Xserver/dix/main.c:350 #11 0x7ffff604909a in __libc_start_main ../csu/libc-start.c:308 #12 0x5555555edc09 in _start (nx-X11/programs/Xserver/nxagent+0x99c09) Address 0x7fffffffcdc0 is located in stack of thread T0 at offset 32 in frame #0 0x5555557d0324 in nxagentCollectPropertyEvent nx-X11/programs/Xserver/hw/nxagent/Clipboard.c:1190 This frame has 5 object(s): [32, 36) 'atomReturnType' <== Memory access at offset 32 partially overflows this variable [96, 100) 'resultFormat' [160, 168) 'ulReturnItems' [224, 232) 'ulReturnBytesLeft' [288, 296) 'pszReturnData' HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-buffer-overflow nx-X11/programs/Xserver/hw/nxagent/compext/Compext.c:4124 in NXGetCollectedProperty ...
* Clipboard.c: small code improvementUlrich Sibiller2020-05-311-8/+7
|
* Clipboard.c: add description/warning for nxagentClearClipboardUlrich Sibiller2020-05-311-0/+6
|
* Clipboard.c: improve some more debugging messagesUlrich Sibiller2020-05-311-19/+20
|
* Clipboard.c: use nxagentClientInfoString for debug outputUlrich Sibiller2020-05-311-58/+38
|