Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Clipboard.c: target forwarding (Part 2/2) | Ulrich Sibiller | 2021-06-20 | 1 | -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 Sibiller | 2021-06-20 | 1 | -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 Window | Ulrich Sibiller | 2021-06-20 | 1 | -17/+17 |
| | |||||
* | Clipboard.c: fix type in status output | Ulrich Sibiller | 2021-06-20 | 1 | -2/+2 |
| | |||||
* | Clipboard.c: avoid superflous atom conversion | Ulrich Sibiller | 2021-06-20 | 1 | -6/+4 |
| | |||||
* | Atoms.c: ensure to always return a valid string... | Ulrich Sibiller | 2021-06-20 | 1 | -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.c | Ulrich Sibiller | 2021-06-20 | 1 | -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 output | Ulrich Sibiller | 2021-06-20 | 1 | -45/+48 |
| | | | | require less lines | ||||
* | Clipboard.c: fix comment position and init array pointer | Ulrich Sibiller | 2021-06-20 | 1 | -2/+3 |
| | |||||
* | Clipboard.c: drop clientCLIPBOARD | Ulrich Sibiller | 2021-06-20 | 1 | -14/+14 |
| | | | | read the value from the intSelAtoms array instead | ||||
* | Clipboard.c: move selection Atoms into separate arrays | Ulrich Sibiller | 2021-06-20 | 1 | -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 FIXME | Ulrich Sibiller | 2021-06-20 | 1 | -5/+11 |
| | |||||
* | Clipboard.c: restructure request accumulation code | Ulrich Sibiller | 2021-06-20 | 1 | -17/+22 |
| | |||||
* | Clipboard.c: use for loops everywhere. | Ulrich Sibiller | 2021-06-20 | 1 | -10/+13 |
| | |||||
* | Clipboard.c: fix memleaks in DEBUG mode | Ulrich Sibiller | 2021-06-20 | 1 | -5/+15 |
| | |||||
* | Clipboard.c: split if clause | Ulrich Sibiller | 2021-06-20 | 1 | -3/+21 |
| | | | | this allows better error messages | ||||
* | Clipboard.c: remove superflous index determination | Ulrich Sibiller | 2021-06-20 | 1 | -88/+84 |
| | | | | we already have it at that stage | ||||
* | Clipboard.c: always print SelectionCallBackKind in debug output | Ulrich Sibiller | 2021-06-20 | 1 | -12/+26 |
| | |||||
* | Clipboard.c: mark self-initiated event | Ulrich Sibiller | 2021-06-20 | 1 | -0/+5 |
| | |||||
* | Clipboard.c: rename function to better reflect meaning | Ulrich Sibiller | 2021-06-20 | 1 | -17/+12 |
| | | | | Also improve Debug output. | ||||
* | Clipboard.c: have lastServer* per selection | Ulrich Sibiller | 2021-06-20 | 1 | -73/+110 |
| | | | | This will help in PRIMARY content appearing in CLIPBOARD and vice versa. | ||||
* | Clipboard.c: fix nxagentConvertSelection | Ulrich Sibiller | 2021-06-20 | 1 | -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 messages | Ulrich Sibiller | 2021-06-20 | 1 | -4/+5 |
| | |||||
* | Clipboard.c: simplify nxagentHandleSelectionRequestFromXServer | Ulrich Sibiller | 2021-06-20 | 1 | -120/+107 |
| | | | | | | - remove redundant calls to nxagentFindLastSelectionOwnerIndex which reduce indentation level - scope improvements | ||||
* | Clipboard.c: use index everywhere | Ulrich Sibiller | 2021-06-20 | 1 | -88/+87 |
| | |||||
* | Clipboard.c: introduce translateLocalToRemote* helpers | Ulrich Sibiller | 2021-06-20 | 1 | -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}Selection | Ulrich Sibiller | 2021-06-20 | 1 | -52/+88 |
| | | | | This helps in avoiding storing the wrong value in a field. | ||||
* | Clipboard.c: reformat for better readability | Ulrich Sibiller | 2021-06-20 | 1 | -23/+23 |
| | |||||
* | Clipboard.c: improve function names once more | Ulrich Sibiller | 2021-06-20 | 1 | -37/+37 |
| | |||||
* | Clipboard.c: rework LastClient stuff to work _per selection_ | Ulrich Sibiller | 2021-06-20 | 1 | -224/+323 |
| | |||||
* | Clipboard.c: catch selection failure from real X server | Ulrich Sibiller | 2021-06-08 | 1 | -0/+8 |
| | |||||
* | Clipboard.c: do not set stage to new value if already set to that value | Ulrich Sibiller | 2021-06-08 | 1 | -0/+9 |
| | |||||
* | Clipboard.c: print times unsigned | Ulrich Sibiller | 2021-06-08 | 1 | -4/+4 |
| | | | | there are no negative times... | ||||
* | Clipboard.c: improve explanations/FIXMEs | Ulrich Sibiller | 2021-06-08 | 1 | -1/+10 |
| | |||||
* | Clipboard.c: improve debugging output | Ulrich Sibiller | 2021-06-08 | 1 | -20/+36 |
| | |||||
* | Clipboard.c: improve error message | Ulrich Sibiller | 2021-06-08 | 1 | -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 comments | Ulrich Sibiller | 2021-06-08 | 1 | -3/+6 |
| | |||||
* | Use NXAGENT_ONSTART define at more locations | Ulrich Sibiller | 2021-06-08 | 1 | -0/+3 |
| | | | | | marking all the code that is not really required when not using nomachine's nxclient. | ||||
* | nxagent: make nxagentXFixesInfo.Initialized a Boolean | Ulrich Sibiller | 2021-01-15 | 1 | -2/+2 |
| | |||||
* | nxagent: treat all Traps as Booleans everywhere | Ulrich Sibiller | 2021-01-15 | 1 | -1/+1 |
| | |||||
* | Clipboard.c: fix bug in special optimization for nested settings | Ulrich Sibiller | 2020-11-04 | 1 | -2/+3 |
| | | | | Fixes ArcticaProject/nx-libs#941 | ||||
* | Clipboard.c: add missing ifdefs | Ulrich Sibiller | 2020-11-03 | 1 | -0/+6 |
| | |||||
* | Clipboard.c: fix missing ) | Ulrich Sibiller | 2020-11-03 | 1 | -1/+1 |
| | |||||
* | nxagent: fix stack smashing | Ulrich Sibiller | 2020-10-17 | 1 | -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 improvement | Ulrich Sibiller | 2020-05-31 | 1 | -8/+7 |
| | |||||
* | Clipboard.c: add description/warning for nxagentClearClipboard | Ulrich Sibiller | 2020-05-31 | 1 | -0/+6 |
| | |||||
* | Clipboard.c: improve some more debugging messages | Ulrich Sibiller | 2020-05-31 | 1 | -19/+20 |
| | |||||
* | Clipboard.c: use nxagentClientInfoString for debug output | Ulrich Sibiller | 2020-05-31 | 1 | -58/+38 |
| | |||||
* | Clipboard.c: add elapsed time for lastClient to stats output if available | Ulrich Sibiller | 2020-05-31 | 1 | -2/+8 |
| | |||||
* | Clipboard.c: call endTransfer() | Ulrich Sibiller | 2020-05-31 | 1 | -4/+1 |
| | | | | instead of sendSelectionNotifyEventToClient + setClientSelectionStage |