Primary selection not working
Modernized fork of NEdit, with unicode support and AA text rendering
Brought to you by:
pyrphoros
I'm currently packaging xnedit for NetBSD (pkgsrc):
https://pkgsrc.se/wip/xnedit
In some situations the paste from primary selection (middle mouse button) does not work.
It works if an xterm holds the primary selection and it fails if a FLTK-based application holds the primary selection. Looks like a data type conversion problem.
The clipboard selection is not affected and seems to work in all cases.
In the code there is a section guarded with "#ifdef APPLE".
Enabling this section unconditionally fixes my problem (tested on NetBSD and GNU/Linux):
--- source/textSel.c.orig 2022-01-09 12:28:40.000000000 +0000 +++ source/textSel.c @@ -251,7 +251,9 @@ void InsertPrimarySelection(Widget w, Ti selectionTime = time; -#ifdef __APPLE__ + +/* #ifdef __APPLE__ */ +#if 1 XtGetSelectionValue(w, XA_PRIMARY, targets[1], getSelectionCB, sel, time); XtGetSelectionValue(w, XA_PRIMARY, targets[0], getSelectionCB, sel, time); #else
Is this split code path still required?
Or is it possible to make the codepath for "APPLE" the default?
Thank you for your input and for packaging xnedit.
Yes it is possible to use only the APPLE code path. I've changed that with the latest commit.