aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Clipboard.c: add elapsed time for lastClient to stats output if availableUlrich Sibiller2020-05-311-2/+8
|
* Clipboard.c: call endTransfer()Ulrich Sibiller2020-05-311-4/+1
| | | | instead of sendSelectionNotifyEventToClient + setClientSelectionStage
* Clipboard.c: drop notifyConvertFailureUlrich Sibiller2020-05-311-24/+15
| | | | | Moving the client check to sendSelectionNotifyEventToClient enables us to drop notifyConvertFailure.
* Clipboard.c: drop unused return code of sendSelectionNotifyEventToClientUlrich Sibiller2020-05-311-8/+8
|
* Clipboard.c: Fix: always reset selectionStage in endTransferUlrich Sibiller2020-05-311-15/+16
|
* Clipboard.c: make setClientSelectionStage a functionUlrich Sibiller2020-05-311-26/+42
| | | | and reset the lastClient variables when stage is set to None.
* Clipboard.c: improve Clipboard statsUlrich Sibiller2020-05-311-1/+11
| | | | resolve lastClientClientPtr to process id and process name
* nxagent: Add keystroke for dumping the current clipboard stateUlrich Sibiller2020-05-311-25/+9
|
* Clipboard.c: fix typoUlrich Sibiller2020-05-071-1/+1
|
* Improve clipboard/xfixes related debug outputUlrich Sibiller2020-05-071-1/+1
|
* Clipboard.c: rename some exported functionsUlrich Sibiller2020-05-071-7/+9
| | | | to make them all fit in the same naming scheme that better describes their purpose.
* Clipboard.c: rename static helpers and macrosUlrich Sibiller2020-05-071-93/+108
| | | | | drop the nxagent prefix to emphasize they are not called from the outside. Also make them static and add prototypes, if missing.
* Clipboard.{c,h}: cleanup prototypesUlrich Sibiller2020-05-071-12/+10
|
* Clipboard.c: deactivate unused codeUlrich Sibiller2020-05-071-0/+5
| | | | | For now deactivate nxagentResetSelectionOwner. Must do some research before removing it completely.
* Clipboard.c: clear windowPtr in ClearSelectionOwnerUlrich Sibiller2020-05-071-4/+1
| | | | | | | | | There were two location where the windowPtr was not cleared after calling ClearSelectionOwner(). One was nxagentInitClipboard where it was set to NULL before and the second one was nxagentClearSelection() where it really should be reset. So we can safely move this to where it really belongs.
* Clipboard.c: print if selection owner is inside nagent in debugging outputUlrich Sibiller2020-05-071-0/+1
|
* Clipboard.c: fix some format specifiersUlrich Sibiller2020-05-071-16/+16
|
* Clipboard.c: fix/improve debugging outputUlrich Sibiller2020-05-071-12/+5
|
* Clipboard.c: rename nxagentLastRequestedSelectionUlrich Sibiller2020-05-071-4/+5
| | | | and correctly print its value in debugging output
* Clipboard.c: fix compilation with DEBUGUlrich Sibiller2020-05-071-0/+2
|
* Clipboard.c: use validateString in debugging outputUlrich Sibiller2020-05-071-8/+8
|
* Clipboard.c: rearrange Atoms in debugging outputUlrich Sibiller2020-05-071-3/+2
| | | | ensure same order for internal and external Atoms
* Clipboard.c: fix shadowed variableUlrich Sibiller2020-01-091-6/+8
| | | | | | | | | | | | this was harmless but not nice nevertheless. Clipboard.c: In function ‘nxagentConvertSelection’: Clipboard.c:1850:9: warning: declaration of ‘i’ shadows a previous local [-Wshadow=compatible-local] int i = nxagentFindCurrentSelectionIndex(selection); ^ Clipboard.c:1736:7: note: shadowed declaration is here int i = nxagentFindCurrentSelectionIndex(selection); ^
* Clipboard.c: cleanup parenthesesUlrich Sibiller2020-01-051-15/+17
|
* Clipboard.c: extend/reformat some commentsUlrich Sibiller2020-01-051-8/+12
|
* Clipboard.c: rename variables/atoms to better reflect their meaningUlrich Sibiller2020-01-051-34/+34
| | | | | | | Unfortunately we cannot rename NX_CUT_BUFFER_SERVER, too, without breaking compatibility because this one is used to signal nomachine's nxclient after the splash screen is gone (see Splash.c, Window.c and ArticaProject/nx-libs#838)
* Clipboard.c: add clientCLIPBOARD variableUlrich Sibiller2020-01-051-3/+7
| | | | | | the MakeAtom call previously used is as good as using a variable but with the variable it is a) easier to read/understand and b) consistent with the other client* variables.
* Clipboard.c: change order of if clause to better match the comment above itUlrich Sibiller2020-01-051-6/+8
|
* Clipboard.c: CLINDEX and GetXErrorString are only used for debuggingUlrich Sibiller2020-01-051-2/+2
|
* Clipboard.c: flush more often to ensure a smooth clipboard experienceUlrich Sibiller2020-01-051-3/+1
|
* Clipboard.c: fix handling of clipboard=none/client/server/both optionUlrich Sibiller2020-01-051-3/+4
|
* Clipboard.c: Use Find*Index helpers at more locationsUlrich Sibiller2020-01-051-16/+15
|
* Clipboard.c: cosmetics/typo fix/untabifyUlrich Sibiller2020-01-051-43/+41
|
* Clipboard.c: introduce helper macro IS_INTERNAL_OWNERUlrich Sibiller2020-01-051-9/+11
| | | | Using this macro makes the code more readable
* Clipboard.c: simplify nxagentSetSelectionOwnerUlrich Sibiller2020-01-051-33/+26
| | | | We do not need to loop over all selections. We have a helper for that.
* Clipboard.c: describe nxagentFind*IndexUlrich Sibiller2020-01-051-0/+8
|
* Clipboard.c: reorder nxagentInitClipboardUlrich Sibiller2020-01-051-10/+11
| | | | | It makes sense to measure time and set the initialized flag right at the start.
* Clipboard.c: clear all selections in nxagentInitClipboardUlrich Sibiller2020-01-051-2/+4
| | | | | | The new code effectively does the same the old one did. But if we change the number of selections the new code will still work correctly while the old one would not.
* Clipboard.c: Fix: re-claim selection on reconnectUlrich Sibiller2020-01-051-20/+28
| | | | | | | On reconnect claim the selection ownership if one of nxagent's clients is a selection owner. The code for this was already there but could not work because the lastSelectionOwner array was always dropped at the beginning of nxagentInitClipboard.
* Clipboard.c: reorder atom allocation codeUlrich Sibiller2020-01-051-10/+10
| | | | | Place the allocation directly before the check for success. Use the same order for server and client atoms.
* Clipboard: align reported targetsUlrich Sibiller2020-01-051-12/+24
| | | | | Always report the same list of available targets to internal and external requests.
* Clipboard.c: check pointer before usageUlrich Sibiller2020-01-051-1/+1
| | | | | The code also worked with pWindow being NULL but it did some unnecessary stuff.
* Clipboard.c: drop superflous variableUlrich Sibiller2020-01-051-9/+7
|
* Clipboard.c: split combined checkUlrich Sibiller2020-01-051-16/+34
| | | | | | By splitting it up we can print appropriate debug messages. More important: The code tried to handle the special targets for all other cases where it should only deny the request.
* Clipboard.c: more debugging outputUlrich Sibiller2020-01-051-0/+4
|
* Clipboard.c: add more explaining commentsUlrich Sibiller2020-01-051-7/+24
|