Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Clipboard.c: extend setSelectionOwnerOnXServer() | Ulrich Sibiller | 2021-06-20 | 1 | -7/+10 | |
| | | | | to let it handle a SelectionClear automatically. | |||||
* | Clipboard.c: remove obsolete (disabled) code | Ulrich Sibiller | 2021-06-20 | 1 | -3/+0 | |
| | | | | | | | Either replyPendingRequest a few lines before will set this to None or it will already be None. Also drop the wrong comment line... | |||||
* | Clipboard.c: add missing target cache invalidation to some (currently ↵ | Ulrich Sibiller | 2021-06-20 | 1 | -0/+2 | |
| | | | | unused) code | |||||
* | Events.c: fix unused variable | Ulrich Sibiller | 2021-06-20 | 1 | -1/+4 | |
| | ||||||
* | Clipboard.c: rename nxagentFindLastSelectionOwnerIndex() | Ulrich Sibiller | 2021-06-20 | 1 | -5/+5 | |
| | | | | Did not refer to LastSelectionOwner at all... | |||||
* | Clipboard.c: rename intermediate variable | Ulrich Sibiller | 2021-06-20 | 1 | -7/+7 | |
| | | | | | Using a capital letter here better reflects that this is an event from the real X server. | |||||
* | Clipboard.c: fix format specifier | Ulrich Sibiller | 2021-06-20 | 1 | -1/+1 | |
| | ||||||
* | Clipboard.c: fix typos in comment | Ulrich Sibiller | 2021-06-20 | 1 | -1/+1 | |
| | ||||||
* | Clipboard.c: Fix: forward the correct type and format | Ulrich Sibiller | 2021-06-20 | 1 | -4/+3 | |
| | | | | now stuff like xclip -o -t LENGTH works (if the owner offers that) | |||||
* | Clipboard.c: improve output for PRINT_CLIPBOARD_CONTENT_ON_DEBUG | Ulrich Sibiller | 2021-06-20 | 1 | -10/+19 | |
| | ||||||
* | Clipboard.c: extend comment | Ulrich Sibiller | 2021-06-20 | 1 | -1/+4 | |
| | ||||||
* | Clipboard.c: add helper variable | Ulrich Sibiller | 2021-06-20 | 1 | -18/+20 | |
| | ||||||
* | Clipboard.c: remove superfluous brackets | Ulrich Sibiller | 2021-06-20 | 1 | -84/+82 | |
| | ||||||
* | Clipboard.c: remove old code | Ulrich Sibiller | 2021-06-20 | 1 | -31/+0 | |
| | | | | | | This block has been unused for a long time now. The comment describing how to reach that path does not make sense anymore because primary and clipboard are not sharing variables anymore. So drop it. | |||||
* | Clipboard.c: harmonize naming regarding internal/local | Ulrich Sibiller | 2021-06-20 | 2 | -162/+162 | |
| | | | | | | Use "local" everywhere instead of a mixture of "local" and "internal". Also replace abbreviations "rem" and "int" by "remote" and "local" because they are confusing readers. | |||||
* | Clipboard.c: use NXAGENT_ONSTART macro on one more location | Ulrich Sibiller | 2021-06-20 | 1 | -0/+2 | |
| | ||||||
* | Clipboard.c: improve some comments as requested by reviewer | Ulrich Sibiller | 2021-06-20 | 1 | -96/+104 | |
| | ||||||
* | NXEvents.c: improve debugging | Ulrich Sibiller | 2021-06-20 | 1 | -0/+3 | |
| | ||||||
* | Clipboard.c: add FIXMEs | Ulrich Sibiller | 2021-06-20 | 1 | -2/+7 | |
| | | | | Also improve code to better match the situation described in the FIXME | |||||
* | Clipboard.c: improve debug output in special case | Ulrich Sibiller | 2021-06-20 | 1 | -1/+4 | |
| | | | | | | This avoids an error message in a special case: nxagentRemoteToLocalAtom: WARNING failed to get name from remote atom. | |||||
* | Clipboard.c: improve comments | Ulrich Sibiller | 2021-06-20 | 1 | -1/+8 | |
| | ||||||
* | Clipboard.c: always flush after XConvertSelection() call | Ulrich Sibiller | 2021-06-20 | 1 | -0/+5 | |
| | | | | This ensures the convert will be sent out immediately. | |||||
* | Clipboard.c: sanity check for invalid resource | Ulrich Sibiller | 2021-06-20 | 1 | -0/+8 | |
| | ||||||
* | Clipboard.c: print more debug details for reply | Ulrich Sibiller | 2021-06-20 | 1 | -4/+4 | |
| | ||||||
* | Clipboard.c: print clipboard content only on explicit request | Ulrich Sibiller | 2021-06-20 | 1 | -10/+36 | |
| | | | | | This helps making people aware that their debug logs might contain sensible information. | |||||
* | Clipboard.c: fix wrong debug message | Ulrich Sibiller | 2021-06-20 | 1 | -2/+2 | |
| | | | | printing the wrong client makes the debug output very confusing ;-) | |||||
* | Clipboard.c: check target cache for valid targets | Ulrich Sibiller | 2021-06-20 | 1 | -0/+98 | |
| | | | | | | | Instead of passing the target to the remote side and then receiving an "invalid target" reply we can do that check directly (if the target cache is filled). This way we can save some more roundtrips due to the target cache. | |||||
* | Clipboard.c: fix some comments, add FIXME | Ulrich Sibiller | 2021-06-20 | 1 | -1/+11 | |
| | ||||||
* | Clipboard.c: move comment to correct location | Ulrich Sibiller | 2021-06-20 | 1 | -6/+6 | |
| | ||||||
* | Clipboard.c: delete property before/after certain operations | Ulrich Sibiller | 2021-06-20 | 1 | -0/+36 | |
| | | | | | | for ICCCM conformity Fixes ArcticaProject/nx-libs#969 | |||||
* | Clipboard.c: improve debugging output once more | Ulrich Sibiller | 2021-06-20 | 1 | -2/+14 | |
| | ||||||
* | Clipboard.c: do not handle unknown selections in Callback handler | Ulrich Sibiller | 2021-06-20 | 1 | -4/+15 | |
| | ||||||
* | Clipboard.c: limit selection nxagentFindCurrentSelectionIndex can return | Ulrich Sibiller | 2021-06-20 | 1 | -1/+15 | |
| | | | | | | | | | | | | | | | | | Normally you'd expect the loop going up to NumCurrentSelections. But the dix code will increase that number (but not nxagentMaxSelections) when drag and drop comes into play. In that case this helper will report a match for other selections than the ones the clipboard code knows about. The subsequent code will then use a higher index which will lead to out of range data reads (and writes!). Therefore we take nxagentMaxSelections here. The startup code ensures that both arrays will refer to the same selection for the first nxagentMaxSelections selection atoms. This way the clipboard code will not kick in for drag and drop resources. Fixes ArcticaProject/nx-libs#986 | |||||
* | Clipboard.c: rework nxagentFind*SelectionIndex() helpers | Ulrich Sibiller | 2021-06-20 | 3 | -14/+16 | |
| | | | | Let them return -1 which makes it easier to check for successful execution. | |||||
* | Clipboard.c: make index the first argument everywhere | Ulrich Sibiller | 2021-06-20 | 1 | -34/+34 | |
| | ||||||
* | Clipboard.c: move property transfer to separate function | Ulrich Sibiller | 2021-06-20 | 1 | -112/+118 | |
| | ||||||
* | Clipboard.c: extend target caching for the other direction | Ulrich Sibiller | 2021-06-20 | 1 | -17/+76 | |
| | | | | | | | | | | This may seem unneccessary at first sight because we are only talking to our own clients which generally is quick. But if you are using nested nx sessions or clients from remote machines (e.g. via ssh X forwarding) this still can save some lenghty communication. Plus: it helps in debugging because there are fewer messages being sent around. | |||||
* | Clipboard.c: add another FIXME | Ulrich Sibiller | 2021-06-20 | 1 | -1/+5 | |
| | ||||||
* | Clipboard.c: cancel pending requests in certain situations | Ulrich Sibiller | 2021-06-20 | 1 | -6/+9 | |
| | ||||||
* | 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.. |