https://bugs.winehq.org/show_bug.cgi?id=50536
--- Comment #2 from Pau Coma Ramirez paucoma@gmail.com --- (In reply to Pau Coma Ramirez from comment #1)
This is a Strange Bug, which I am experiencing too, although only when launched via the ubuntu launcher. I have documented my Behavior in Bug 50598. In my case launching the program directly from a terminal window normally works, its only when I use the launcher.
I have found that the following seems to have effect even when launching via the ubuntu launcher(i.e. .desktop shortcut). but I am not sure about its persistance.
Basically open a terminal window and within your defined prefix of wine for which you run notepad edit/add the registry key
[HKEY_LOCAL_MACHINE\Software\Wine\X11 Driver] "UsePrimarySelection"="1"
The following command should do the trick
WINEPREFIX=~/.wine32 wine reg add "HKLM\Software\Wine\X11 Driver" /v UsePrimarySelection /t REG_SZ /d 1
Note: I am assuming that ~/.wine32 is the wine prefix your notepad++ runs in.
More documentation on that registry edit "hack" [here](https://askubuntu.com/a/1312004/258256) Although in my case it worked with HKLM, others have suggested HKCU. So, you may also want to add [HKEY_CURRENT_USER\Software\Wine\X11 Driver] "UsePrimarySelection"="1"
I was mistaken, it must have been coincidence with something else that HKLM registry modification did anything.
according to the code "HKLM\Software\Wine\X11 Driver" is not checked but HKCU is..
Basically it checks:
- "HKCU\Software\Wine\AppDefaults\app.exe\X11 Driver\UsePrimarySelection" + app.exe is the name of your executable file - "HKCU\Software\Wine\X11 Driver\UsePrimarySelection"
Values accepted as "True" #define IS_OPTION_TRUE(ch) \ ((ch) == 'y' || (ch) == 'Y' || (ch) == 't' || (ch) == 'T' || (ch) == '1')
More info in the function [ setup_options(void)](https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/winex11.drv/x11drv_ma...)