Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Clipboard.c: introduce replyPendingRequestSelectionToXServer helper | Ulrich Sibiller | 2021-06-20 | 1 | -31/+39 |
| | |||||
* | Clipboard.c: move some (currently commented) code to inner scope | Ulrich Sibiller | 2021-06-20 | 1 | -3/+3 |
| | |||||
* | Events.c: use already available variable instead of repeating conversion | Ulrich Sibiller | 2021-06-20 | 1 | -1/+1 |
| | |||||
* | Clipboard.c: reset lastServer[].requestor on reconnect | Ulrich Sibiller | 2021-06-20 | 1 | -4/+10 |
| | |||||
* | Clipboard.c: improve some comments | Ulrich Sibiller | 2021-06-20 | 1 | -9/+5 |
| | |||||
* | Clipboard.c: implement target caching | Ulrich Sibiller | 2021-06-20 | 1 | -0/+118 |
| | | | | | | | | | | | | | | | | | | | | | | Some applications (e.g. Chrome, Firefox) send multiple TARGETS requests when they want to paste a selection (reason currently unknown). If such an application runs in an NX session and the current clipboard owner is on the real X server this triggers many (superflous) roundtrips. By caching the first answer to those requests and answering subsequent requests from the cache we can eliminate all this communication. The implemention resulted from attempting to fix ArcticaProject/nx-libs/issues/#969 (solution 1a) but it turned out that the speedup this brings does not help in reducing the number of requests by firefox. It must be a bug in the firefox code. Nevertheless I kept the code as it should speed up the whole pasting process considerably while reducing communication over the wire. This also eliminates a memory leak in the target forwarding code which was unnoticed before. | ||||
* | Clipboard.c: fix indentation | Ulrich Sibiller | 2021-06-20 | 1 | -4/+4 |
| | |||||
* | Clipboard.c: correctly pass back failure to real X server | Ulrich Sibiller | 2021-06-20 | 1 | -22/+46 |
| | |||||
* | Clipboard.c: fix: return after denying request | Ulrich Sibiller | 2021-06-20 | 1 | -0/+1 |
| | |||||
* | Clipboard.c: remove obsolete FIXME comment | Ulrich Sibiller | 2021-06-20 | 1 | -5/+0 |
| | |||||
* | Clipboard.c: once again improved DEBUG output | Ulrich Sibiller | 2021-06-20 | 1 | -13/+34 |
| | | | | | | | | Also reduce number of certain DEBUG lines: These PropertyEvents tend to appear quite often and most of the times they have nothing to do with the clipboard. So instead of printing them everytime we turn that around and print something only if it is a clipboard related event.. | ||||
* | Clipboard.c: fix: remove wrong optimization | Ulrich Sibiller | 2021-06-20 | 1 | -14/+4 |
| | | | | | | | | | | In the "none" case we must ensure the clipboard data is reset. This "optimization" skipped the reset part which made the code think it is waiting for an answer. Which (of course) never arrived. So any further request was rejected... Also reduce debugging output for the "none" case because resetClientSelectionStage will print it anyway. | ||||
* | Clipboard.c: use NullClient instead of NULL where appropriate | Ulrich Sibiller | 2021-06-20 | 1 | -2/+2 |
| | |||||
* | Events.c: use index instead of i | Ulrich Sibiller | 2021-06-20 | 1 | -7/+7 |
| | | | | we do that everywhere when handling clipboard stuff | ||||
* | Clipboard.c: fix transfer from agent to X server | Ulrich Sibiller | 2021-06-20 | 1 | -1/+6 |
| | | | | The code took the wrong path because of an insufficent check | ||||
* | Clipboard.c: fix some whitepace, comments and FIXMEs | Ulrich Sibiller | 2021-06-20 | 1 | -5/+4 |
| | |||||
* | Clipboard: init variable | Ulrich Sibiller | 2021-06-20 | 1 | -1/+6 |
| | |||||
* | Clipboard.c: print separator when receiving events/requests in debug mode | Ulrich Sibiller | 2021-06-20 | 1 | -5/+5 |
| | | | | This helps reading the debug output a lot! | ||||
* | Clipboard.c: another round of debug improvements | Ulrich Sibiller | 2021-06-20 | 1 | -19/+33 |
| | |||||
* | Clipboard.c: replace loop by helper | Ulrich Sibiller | 2021-06-20 | 1 | -13/+1 |
| | |||||
* | Clipboard.c: disable TEXT and COMPOUND_TEXT | Ulrich Sibiller | 2021-06-20 | 1 | -12/+77 |
| | | | | They are ancient and their use is discouraged by ICCCM | ||||
* | nxagent: add option -textclipboard | Ulrich Sibiller | 2021-06-20 | 5 | -7/+261 |
| | | | | textclipboard=<bool> in the options file | ||||
* | Clipboard.c: extend comments | Ulrich Sibiller | 2021-06-20 | 1 | -3/+8 |
| | |||||
* | Clipboard.c: add TARGET_SIZES | Ulrich Sibiller | 2021-06-20 | 3 | -2/+29 |
| | |||||
* | Clipboard.c: add FIXMEs | Ulrich Sibiller | 2021-06-20 | 1 | -0/+4 |
| | |||||
* | Clipboard.c: add some more selection atoms | Ulrich Sibiller | 2021-06-20 | 3 | -15/+145 |
| | | | | | 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 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 | 2 | -53/+52 |
| | | | | | | ... 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. | ||||
* | Atoms.c: add helper to easily print Atom names in debugging | Ulrich Sibiller | 2021-06-20 | 2 | -2/+62 |
| | |||||
* | 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 | 3 | -20/+15 |
| | | | | 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 |
| |