When trying to get Geany usable on OS X I noticed paste doesn't work when using GTK with Quartz backend (from MacPorts). I'm apparently not the only one who has noticed this:
https://sourceforge.net/p/geany/bugs/1041/
http://lists.geany.org/pipermail/devel/2012-October/007162.html
http://lists.geany.org/pipermail/users/2012-July/008104.html
Attached is a patch which replaces the gtk_selection_convert() (which doesn't work) with the corresponding GtkClipboard call (which works).
After making this change, middle click paste of the primary selection no longer works on Linux.
I see. I've been playing with the code a bit more both under Linux and OS X and it seems to be possible to keep the original code for the selection_received signal and use GtkClipboard just for paste() called from code (see the attached patch). I don't see any side-effects of this (of course the middle-click paste doesn't work on OS X but this is not a big problem since it's not a common behaviour there).
Committed as [aa0c98].
Related
Commit: [aa0c98]