aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Atoms.c: ensure to always return a valid string...Ulrich Sibiller2021-06-202-53/+52
| | | | | | ... by providing NameFor(Int|Rem)Atom() macros This way we do not have to validate it at various other places.
* Clipboard.c: make use of the new helpers from Atoms.cUlrich Sibiller2021-06-201-113/+50
| | | | | This saves us from having to create intermediate strings and Xfreeing them again. Which can easily be forgotten, producing memleaks.
* Atoms.c: add helper to easily print Atom names in debuggingUlrich Sibiller2021-06-202-2/+62
|
* Clipboard.c: compact clipboard status outputUlrich Sibiller2021-06-201-45/+48
| | | | require less lines
* Clipboard.c: fix comment position and init array pointerUlrich Sibiller2021-06-201-2/+3
|
* Clipboard.c: drop clientCLIPBOARDUlrich Sibiller2021-06-201-14/+14
| | | | read the value from the intSelAtoms array instead
* Clipboard.c: move selection Atoms into separate arraysUlrich Sibiller2021-06-201-39/+49
| | | | | They really only change on startup and reconnect. Also with this change we now only have internal Atoms in the LastSelectionOwner array.
* Clipboard.c: rephrase FIXMEUlrich Sibiller2021-06-201-5/+11
|
* Clipboard.c: restructure request accumulation codeUlrich Sibiller2021-06-201-17/+22
|
* Clipboard.c: use for loops everywhere.Ulrich Sibiller2021-06-201-10/+13
|
* Clipboard.c: fix memleaks in DEBUG modeUlrich Sibiller2021-06-201-5/+15
|
* Clipboard.c: split if clauseUlrich Sibiller2021-06-201-3/+21
| | | | this allows better error messages
* Clipboard.c: remove superflous index determinationUlrich Sibiller2021-06-201-88/+84
| | | | we already have it at that stage
* Clipboard.c: always print SelectionCallBackKind in debug outputUlrich Sibiller2021-06-201-12/+26
|
* Clipboard.c: mark self-initiated eventUlrich Sibiller2021-06-201-0/+5
|
* Clipboard.c: rename function to better reflect meaningUlrich Sibiller2021-06-203-20/+15
| | | | Also improve Debug output.
* Clipboard.c: have lastServer* per selectionUlrich Sibiller2021-06-201-73/+110
| | | | This will help in PRIMARY content appearing in CLIPBOARD and vice versa.
* Clipboard.c: fix nxagentConvertSelectionUlrich Sibiller2021-06-201-22/+24
| | | | | | | - debug output was not printed at the beginning but later and was therefore missing sometimes - add comments/FIXMEs - re-enable failure notification for second call
* Clipboard.c: improve debug/test messagesUlrich Sibiller2021-06-201-4/+5
|
* Clipboard.c: simplify nxagentHandleSelectionRequestFromXServerUlrich Sibiller2021-06-201-120/+107
| | | | | | - remove redundant calls to nxagentFindLastSelectionOwnerIndex which reduce indentation level - scope improvements
* Clipboard.c: use index everywhereUlrich Sibiller2021-06-201-88/+87
|
* Clipboard.c: introduce translateLocalToRemote* helpersUlrich Sibiller2021-06-201-108/+90
| | | | | This also unifies target handling to never use TEXT or COMPOUND_TEXT (despite announcing it)
* Clipboard.c: rename selection fields to {int,rem}SelectionUlrich Sibiller2021-06-201-52/+88
| | | | This helps in avoiding storing the wrong value in a field.
* Clipboard.c: reformat for better readabilityUlrich Sibiller2021-06-201-23/+23
|
* Clipboard.c: improve function names once moreUlrich Sibiller2021-06-203-39/+39
|
* Clipboard.c: rework LastClient stuff to work _per selection_Ulrich Sibiller2021-06-203-232/+325
|
* Clipboard.c: catch selection failure from real X serverUlrich Sibiller2021-06-081-0/+8
|
* Clipboard.c: do not set stage to new value if already set to that valueUlrich Sibiller2021-06-081-0/+9
|
* Clipboard.c: print times unsignedUlrich Sibiller2021-06-081-4/+4
| | | | there are no negative times...
* Clipboard.c: improve explanations/FIXMEsUlrich Sibiller2021-06-081-1/+10
|
* Clipboard.c: improve debugging outputUlrich Sibiller2021-06-081-20/+36
|
* Clipboard.c: improve error messageUlrich Sibiller2021-06-081-20/+37
| | | | | | if we get an unexpected property print that as an error. Before we saw "unexpected stage" in that case which does not really help in debugging...
* Clipboard.c: add/fix commentsUlrich Sibiller2021-06-081-3/+6
|
* Merge branch 'uli42-pr/various7' into 3.6.xMike Gabriel2021-06-0831-399/+542
|\ | | | | | | Attributes GH PR #1007: https://github.com/ArcticaProject/nx-libs/pull/1007
| * nxagent: add missing command line switches to usage textUlrich Sibiller2021-06-081-0/+4
| |
| * Trap.h: fix type of trapsUlrich Sibiller2021-06-081-13/+15
| | | | | | | | They are Booleans for some time now but this change was missing in Trap.h
| * nxagent: fix some variable types in InitUlrich Sibiller2021-06-082-3/+3
| |
| * nxagent: make nxagentX2go a Boolean everywhereUlrich Sibiller2021-06-085-5/+5
| | | | | | | | also correct ugly if formatting regarding nxagentX2go
| * nxagent: make nxagentAlpha* BooleansUlrich Sibiller2021-06-085-10/+10
| |
| * nxagent: treat enableBackingStore as BooleanUlrich Sibiller2021-06-082-4/+4
| | | | | | | | Use TRUE and FALSE like dix does.
| * nxagent: make nxagentCompositeEnable a BooleanUlrich Sibiller2021-06-085-11/+9
| | | | | | | | there's no need for that variable to be tri-state
| * Composite.c: fix commentUlrich Sibiller2021-06-081-3/+3
| |
| * nxagent: add command line switch to enable compositeUlrich Sibiller2021-06-085-7/+20
| | | | | | | | We have it disabled by default but there hasn't been a way to enable it.
| * Compext.c: fix comparisons of 16bit sequence numbersUlrich Sibiller2021-06-081-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rep->generic.sequenceNumber is of type CARD16 state->sequence is of type unsigned long Converting state->sequence to an int as it has been done since the first version of nxcomp I know of (1.3.0-18 from 2003) is wrong here because for numbers > INT_MAX this will result in a negative number, which, after applying the 16bit modulo, will not match rep->generic.sequenceNumber. Example with numbers: CARD16 c = 24565 unsigned long u = 3179110389 c % 65536 = 24565 u % 65536 = 24565 (int)(u) = -1115856907 (int)(u) % 65536 = -40971 -40971 will not match 24565 To fix this we need to ensure the number stays positive. We use CARD16 for this to match the type in the request which is a 16bit number. On my system CARD16 is unsigned short which is guaranteed to contain _at least_ the 0-65,535 range. As there is no upper limit of the range we cannot drop the modulo because we need this value to be 16bit and not more. Thanks to Norm Green for providing log after log until we could finally identify the reason for him seeing "Xlib: unexpected async reply (sequence 0x94b01439)!" when pasting stopped working.
| * Compext.c: fix misleading error messageUlrich Sibiller2021-06-081-5/+6
| | | | | | | | | | An X reply contains a type which is X_Reply or X_Error. This is not an opcode which is used when installing the handler.
| * Compext.c: print received vs expected sequence numberUlrich Sibiller2021-06-081-0/+28
| | | | | | | | Should help in debugging "unexpected async reply" problems
| * Compext.c: document function return codesUlrich Sibiller2021-06-081-0/+64
| |
| * document additional options only nxagent knows aboutUlrich Sibiller2021-06-083-36/+58
| |
| * Error.c: untabifyUlrich Sibiller2021-06-081-75/+75
| |
| * nxagent: drop NXAGENT_SHAPE2 defineUlrich Sibiller2021-06-082-26/+10
| | | | | | | | | | it was the default for years now, so let's drop the define and include the code unconditonally.