Menu

#18 Primary selection not working

1.0
closed
nobody
None
2022-07-10
2022-01-24
No

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?

Discussion

  • Pyrphoros

    Pyrphoros - 2022-01-24

    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.

     
  • Pyrphoros

    Pyrphoros - 2022-07-10
    • status: open --> closed
     

Log in to post a comment.