aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
Commit message (Collapse)AuthorAgeFilesLines
* Clipboard.c: Add debug output when selection is already clearedUlrich Sibiller2021-07-051-0/+6
|
* Clipboard.c: check for invalid indexUlrich Sibiller2021-07-051-5/+9
| | | | | | We only need to check this in nxagentHandleSelectionClearFromXServerByIndex, so we can simplify nxagentHandleSelectionClearFromXServerByAtom.
* Events.c: add another commentUlrich Sibiller2021-07-051-0/+5
|
* Fix Xfixes event handlingUlrich Sibiller2021-07-055-148/+137
| | | | | | | | | Calling the callback on receptions of an EXTERNAL xfixes event was a weird idea from the start. However, since adding the protection trap around it it made no sense at all because it effectivly made the callback a noop for that case. So let's drop all the trap nonsense and implement it properly. The callback will only be used for actions by internal clients.
* NXdispatch.c: add an explaining commentUlrich Sibiller2021-06-221-3/+8
| | | | and restructure a bit.
* Clipboard.c: print debug message if selection is already clearedUlrich Sibiller2021-06-211-0/+6
|
* Clipboard.c: Only take full clipboard clearing action if non-emptyUlrich Sibiller2021-06-211-11/+11
|
* Clipboard.c: improve some commentsUlrich Sibiller2021-06-211-3/+10
|
* Clipboard.c: remove superflous checkUlrich Sibiller2021-06-211-14/+6
| | | | replyPendingRequestSelectionToXServer already checks for None
* Clipboard.c: restruct setSelectionOwnerOnXServerUlrich Sibiller2021-06-211-69/+76
| | | | Immediately abort if the selection index cannot be determined.
* Clipboard.c: do not process requests if we do not have a local ownerUlrich Sibiller2021-06-211-0/+9
| | | | | | This can happen after having processed a SelectionClear event while the real X server still knows the nxagent serverWindow as the selection owner.
* Clipboard.c: extend setSelectionOwnerOnXServer()Ulrich Sibiller2021-06-201-7/+10
| | | | to let it handle a SelectionClear automatically.
* Clipboard.c: remove obsolete (disabled) codeUlrich Sibiller2021-06-201-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 Sibiller2021-06-201-0/+2
| | | | unused) code
* Events.c: fix unused variableUlrich Sibiller2021-06-201-1/+4
|
* Clipboard.c: rename nxagentFindLastSelectionOwnerIndex()Ulrich Sibiller2021-06-201-5/+5
| | | | Did not refer to LastSelectionOwner at all...
* Clipboard.c: rename intermediate variableUlrich Sibiller2021-06-201-7/+7
| | | | | Using a capital letter here better reflects that this is an event from the real X server.
* Clipboard.c: fix format specifierUlrich Sibiller2021-06-201-1/+1
|
* Clipboard.c: fix typos in commentUlrich Sibiller2021-06-201-1/+1
|
* Clipboard.c: Fix: forward the correct type and formatUlrich Sibiller2021-06-201-4/+3
| | | | now stuff like xclip -o -t LENGTH works (if the owner offers that)
* Clipboard.c: improve output for PRINT_CLIPBOARD_CONTENT_ON_DEBUGUlrich Sibiller2021-06-201-10/+19
|
* Clipboard.c: extend commentUlrich Sibiller2021-06-201-1/+4
|
* Clipboard.c: add helper variableUlrich Sibiller2021-06-201-18/+20
|
* Clipboard.c: remove superfluous bracketsUlrich Sibiller2021-06-201-84/+82
|
* Clipboard.c: remove old codeUlrich Sibiller2021-06-201-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/localUlrich Sibiller2021-06-202-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 locationUlrich Sibiller2021-06-201-0/+2
|
* Clipboard.c: improve some comments as requested by reviewerUlrich Sibiller2021-06-201-96/+104
|
* NXEvents.c: improve debuggingUlrich Sibiller2021-06-201-0/+3
|
* Clipboard.c: add FIXMEsUlrich Sibiller2021-06-201-2/+7
| | | | Also improve code to better match the situation described in the FIXME
* Clipboard.c: improve debug output in special caseUlrich Sibiller2021-06-201-1/+4
| | | | | | This avoids an error message in a special case: nxagentRemoteToLocalAtom: WARNING failed to get name from remote atom.
* Clipboard.c: improve commentsUlrich Sibiller2021-06-201-1/+8
|
* Clipboard.c: always flush after XConvertSelection() callUlrich Sibiller2021-06-201-0/+5
| | | | This ensures the convert will be sent out immediately.
* Clipboard.c: sanity check for invalid resourceUlrich Sibiller2021-06-201-0/+8
|
* Clipboard.c: print more debug details for replyUlrich Sibiller2021-06-201-4/+4
|
* Clipboard.c: print clipboard content only on explicit requestUlrich Sibiller2021-06-201-10/+36
| | | | | This helps making people aware that their debug logs might contain sensible information.
* Clipboard.c: fix wrong debug messageUlrich Sibiller2021-06-201-2/+2
| | | | printing the wrong client makes the debug output very confusing ;-)
* Clipboard.c: check target cache for valid targetsUlrich Sibiller2021-06-201-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 FIXMEUlrich Sibiller2021-06-201-1/+11
|
* Clipboard.c: move comment to correct locationUlrich Sibiller2021-06-201-6/+6
|
* Clipboard.c: delete property before/after certain operationsUlrich Sibiller2021-06-201-0/+36
| | | | | | for ICCCM conformity Fixes ArcticaProject/nx-libs#969
* Clipboard.c: improve debugging output once moreUlrich Sibiller2021-06-201-2/+14
|
* Clipboard.c: do not handle unknown selections in Callback handlerUlrich Sibiller2021-06-201-4/+15
|
* Clipboard.c: limit selection nxagentFindCurrentSelectionIndex can returnUlrich Sibiller2021-06-201-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() helpersUlrich Sibiller2021-06-203-14/+16
| | | | Let them return -1 which makes it easier to check for successful execution.
* Clipboard.c: make index the first argument everywhereUlrich Sibiller2021-06-201-34/+34
|
* Clipboard.c: move property transfer to separate functionUlrich Sibiller2021-06-201-112/+118
|
* Clipboard.c: extend target caching for the other directionUlrich Sibiller2021-06-201-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 FIXMEUlrich Sibiller2021-06-201-1/+5
|
* Clipboard.c: cancel pending requests in certain situationsUlrich Sibiller2021-06-201-6/+9
|