After a recent update, middle-click paste (primary selection) stopped working for me in GTK-based applications.
After some investigation, I found that the setting gtk-enable-primary-paste had been set to false.
gsettings set org.gnome.desktop.interface gtk-enable-primary-paste true