JUCE uses the wrong X11 selection for pasting

On Linux, JUCE has always used the wrong X11 selection for pasting. Pasting using either Ctrl+V or by right clicking and pasting from the context menu will currently (as of JUCE 6.0.8) insert text stored from the PRIMARY selection, i.e. the selection containing text the user has last highlighted/selected. Instead, pasting should be done from the CLIPBOARD selection, as mentioned in this specification.

The current behavior mostly causes issues for plugins with text fields for entering serial numbers or passwords. Those are often directly copied from a website or password manager without being visible to the user, and thus they will end up in the CLIPBOARD selection but not in PRIMARY.

For historical context, this bug has been fixed in faf5ed4 (currently on the develop branch).

1 Like