aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Clipboard.c: use macros instead of hardcoced values for timeoutsUlrich Sibiller2020-01-051-3/+14
|
* Clipboard.c: fix timeout comparisonUlrich Sibiller2020-01-051-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 BooleanUlrich Sibiller2020-01-051-4/+8
|
* Clipboard.c: avoid nested externUlrich Sibiller2020-01-051-4/+4
|
* Clipboard.c: fix string formatting directivesUlrich Sibiller2020-01-051-2/+2
|
* Clipboard.c: Fix formattingUlrich Sibiller2020-01-051-2/+2
|
* Clipboard.c, NXproperty.c: match prototypesUlrich Sibiller2020-01-051-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 commentsUlrich Sibiller2020-01-051-5/+3
|
* Clipboard.c: add FIXMEsUlrich Sibiller2020-01-051-0/+3
|
* Clipboard.c: add nxagentMatchSelectionOwner helper functionUlrich Sibiller2020-01-051-2/+7
|
* Clipboard.c: make agentClipboardStatus a BooleanUlrich Sibiller2020-01-051-14/+43
| | | | and add debugging information around its checks.
* Clipboard.c: refactor nxagent*SelectionOwnerUlrich Sibiller2020-01-051-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 appropriateUlrich Sibiller2020-01-051-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 targetsUlrich Sibiller2019-11-151-3/+2
| | | | | fix one FIXME. This is a rewritten and extended version of a quick patch by Danil Pleshakov and Dimbor.
* Clipboard: fix debugging outputUlrich Sibiller2019-11-151-4/+10
| | | | Correctly determine the Atom names from the real X server.
* Clipboard.c: automatically calc the array sizeUlrich Sibiller2019-11-151-2/+2
|
* Clipboard.c: improve XChangeProperty codeUlrich Sibiller2019-11-151-2/+2
| | | | | | | | | | The previously used "Atom" type was confusing. Clarify this by writing the code as requested in the manpage of XChangeProperty: "If the specified format is 8, the property data must be a char array. If the specified format is 16, the property data must be a short array. If the specified format is 32, the property data must be a long array."
* Clipboard.c: rename nxagentNotifySelection to ↵Ulrich Sibiller2019-09-291-4/+5
| | | | | | nxagentHandleSelectionNotifyFromXServer Use a more descriptive name.
* Clipboard.c: fix nested clipboard handlingUlrich Sibiller2019-09-291-1/+8
| | | | Fixes ArcticaProject/nx-libs#632
* Clipboard.c: add some more FIXMEsUlrich Sibiller2019-09-291-0/+20
|
* Clipboard.c: drop old commented codeUlrich Sibiller2019-09-291-16/+0
|
* Clipboard.c: fix: translate target on transferUlrich Sibiller2019-09-291-0/+23
|
* Clipboard.c: flush the display during transfer phaseUlrich Sibiller2019-09-291-0/+6
| | | | This avoids delays, timeouts and missing copy/paste actions.
* Clipboard.c: remove superflous returnUlrich Sibiller2019-09-291-2/+0
|
* Clipboard.c: drop unneeded return codeUlrich Sibiller2019-09-291-8/+10
|
* Clipboard.c: add loads of commentsUlrich Sibiller2019-09-291-32/+195
|
* Clipboard.c: rework debug printsUlrich Sibiller2019-09-291-57/+167
| | | | add new debug output, extend existing, drop meaningless