Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Clipboard.c: rename some exported functions | Ulrich Sibiller | 2020-05-07 | 1 | -7/+9 |
| | | | | to make them all fit in the same naming scheme that better describes their purpose. | ||||
* | Clipboard.c: rename static helpers and macros | Ulrich Sibiller | 2020-05-07 | 1 | -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 prototypes | Ulrich Sibiller | 2020-05-07 | 1 | -12/+10 |
| | |||||
* | Clipboard.c: deactivate unused code | Ulrich Sibiller | 2020-05-07 | 1 | -0/+5 |
| | | | | | For now deactivate nxagentResetSelectionOwner. Must do some research before removing it completely. | ||||
* | Clipboard.c: clear windowPtr in ClearSelectionOwner | Ulrich Sibiller | 2020-05-07 | 1 | -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 output | Ulrich Sibiller | 2020-05-07 | 1 | -0/+1 |
| | |||||
* | Clipboard.c: fix some format specifiers | Ulrich Sibiller | 2020-05-07 | 1 | -16/+16 |
| | |||||
* | Clipboard.c: fix/improve debugging output | Ulrich Sibiller | 2020-05-07 | 1 | -12/+5 |
| | |||||
* | Clipboard.c: rename nxagentLastRequestedSelection | Ulrich Sibiller | 2020-05-07 | 1 | -4/+5 |
| | | | | and correctly print its value in debugging output | ||||
* | Clipboard.c: fix compilation with DEBUG | Ulrich Sibiller | 2020-05-07 | 1 | -0/+2 |
| | |||||
* | Clipboard.c: use validateString in debugging output | Ulrich Sibiller | 2020-05-07 | 1 | -8/+8 |
| | |||||
* | Clipboard.c: rearrange Atoms in debugging output | Ulrich Sibiller | 2020-05-07 | 1 | -3/+2 |
| | | | | ensure same order for internal and external Atoms | ||||
* | Clipboard.c: fix shadowed variable | Ulrich Sibiller | 2020-01-09 | 1 | -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 parentheses | Ulrich Sibiller | 2020-01-05 | 1 | -15/+17 |
| | |||||
* | Clipboard.c: extend/reformat some comments | Ulrich Sibiller | 2020-01-05 | 1 | -8/+12 |
| | |||||
* | Clipboard.c: rename variables/atoms to better reflect their meaning | Ulrich Sibiller | 2020-01-05 | 1 | -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 variable | Ulrich Sibiller | 2020-01-05 | 1 | -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 it | Ulrich Sibiller | 2020-01-05 | 1 | -6/+8 |
| | |||||
* | Clipboard.c: CLINDEX and GetXErrorString are only used for debugging | Ulrich Sibiller | 2020-01-05 | 1 | -2/+2 |
| | |||||
* | Clipboard.c: flush more often to ensure a smooth clipboard experience | Ulrich Sibiller | 2020-01-05 | 1 | -3/+1 |
| | |||||
* | Clipboard.c: fix handling of clipboard=none/client/server/both option | Ulrich Sibiller | 2020-01-05 | 1 | -3/+4 |
| | |||||
* | Clipboard.c: Use Find*Index helpers at more locations | Ulrich Sibiller | 2020-01-05 | 1 | -16/+15 |
| | |||||
* | Clipboard.c: cosmetics/typo fix/untabify | Ulrich Sibiller | 2020-01-05 | 1 | -43/+41 |
| | |||||
* | Clipboard.c: introduce helper macro IS_INTERNAL_OWNER | Ulrich Sibiller | 2020-01-05 | 1 | -9/+11 |
| | | | | Using this macro makes the code more readable | ||||
* | Clipboard.c: simplify nxagentSetSelectionOwner | Ulrich Sibiller | 2020-01-05 | 1 | -33/+26 |
| | | | | We do not need to loop over all selections. We have a helper for that. | ||||
* | Clipboard.c: describe nxagentFind*Index | Ulrich Sibiller | 2020-01-05 | 1 | -0/+8 |
| | |||||
* | Clipboard.c: reorder nxagentInitClipboard | Ulrich Sibiller | 2020-01-05 | 1 | -10/+11 |
| | | | | | It makes sense to measure time and set the initialized flag right at the start. | ||||
* | Clipboard.c: clear all selections in nxagentInitClipboard | Ulrich Sibiller | 2020-01-05 | 1 | -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 reconnect | Ulrich Sibiller | 2020-01-05 | 1 | -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 code | Ulrich Sibiller | 2020-01-05 | 1 | -10/+10 |
| | | | | | Place the allocation directly before the check for success. Use the same order for server and client atoms. | ||||
* | Clipboard: align reported targets | Ulrich Sibiller | 2020-01-05 | 1 | -12/+24 |
| | | | | | Always report the same list of available targets to internal and external requests. | ||||
* | Clipboard.c: check pointer before usage | Ulrich Sibiller | 2020-01-05 | 1 | -1/+1 |
| | | | | | The code also worked with pWindow being NULL but it did some unnecessary stuff. | ||||
* | Clipboard.c: drop superflous variable | Ulrich Sibiller | 2020-01-05 | 1 | -9/+7 |
| | |||||
* | Clipboard.c: split combined check | Ulrich Sibiller | 2020-01-05 | 1 | -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 output | Ulrich Sibiller | 2020-01-05 | 1 | -0/+4 |
| | |||||
* | Clipboard.c: add more explaining comments | Ulrich Sibiller | 2020-01-05 | 1 | -7/+24 |
| | |||||
* | Clipboard.c: use macros instead of hardcoced values for timeouts | Ulrich Sibiller | 2020-01-05 | 1 | -3/+14 |
| | |||||
* | Clipboard.c: fix timeout comparison | Ulrich Sibiller | 2020-01-05 | 1 | -2/+2 |
| | | | | | We had comparisions for >5000 and <5000, but =5000 was not explicitly handled. In that case the code took an unexpected path. | ||||
* | Clipboard: make nxagentInitClipboard return a Boolean | Ulrich Sibiller | 2020-01-05 | 1 | -4/+8 |
| | |||||
* | Clipboard.c: avoid nested extern | Ulrich Sibiller | 2020-01-05 | 1 | -4/+4 |
| | |||||
* | Clipboard.c: fix string formatting directives | Ulrich Sibiller | 2020-01-05 | 1 | -2/+2 |
| | |||||
* | Clipboard.c: Fix formatting | Ulrich Sibiller | 2020-01-05 | 1 | -2/+2 |
| | |||||
* | Clipboard.c, NXproperty.c: match prototypes | Ulrich Sibiller | 2020-01-05 | 1 | -0/+5 |
| | | | | | | The prototype for nxagentGetClipboardWindow has been changed in 63320437ed4e95246ce62193560098f986ac265c but the changes have not made it into NXproperty.c... | ||||
* | Clipboard.c: reformat some comments | Ulrich Sibiller | 2020-01-05 | 1 | -5/+3 |
| | |||||
* | Clipboard.c: add FIXMEs | Ulrich Sibiller | 2020-01-05 | 1 | -0/+3 |
| | |||||
* | Clipboard.c: add nxagentMatchSelectionOwner helper function | Ulrich Sibiller | 2020-01-05 | 1 | -2/+7 |
| | |||||
* | Clipboard.c: make agentClipboardStatus a Boolean | Ulrich Sibiller | 2020-01-05 | 1 | -14/+43 |
| | | | | and add debugging information around its checks. | ||||
* | Clipboard.c: refactor nxagent*SelectionOwner | Ulrich Sibiller | 2020-01-05 | 1 | -28/+28 |
| | | | | | | | expect an index instead of a pointer All calls referenced lastSelectionOwner so let the function directly use it and only pass the required index. | ||||
* | nxagent: Use XlibAtom data type where appropriate | Ulrich Sibiller | 2020-01-05 | 1 | -17/+16 |
| | | | | | | | | XlibAtom should be used wherever remote atoms are handled. This is important as Xlib data types and server data types of the same name do not always have identical sizes. See also https://lists.freedesktop.org/archives/xorg-devel/2015-August/047245.html | ||||
* | Clipboard.c: report more supported targets | Ulrich Sibiller | 2019-11-15 | 1 | -3/+2 |
| | | | | | fix one FIXME. This is a rewritten and extended version of a quick patch by Danil Pleshakov and Dimbor. |