Disabling Middle Click Paste does not apply to Flatpaks

Hi everyone.
I’m currently using Silverblue and it’s very fun. I have a few small issues though.
One that I’m currently stuck on is: I hate middle click paste. Especially with a trackpoint I just hit it accidentally all the time. That’s why I disabled it using Gnome Tweaks. This works fine for my terminal window, which runs in the actual host, but all Flatpak applications (which is almost everything in Silverblue, e.g. VSCode, Firefox) do not respect this setting.

Do any of you have an idea on how to make this setting propagate correctly, ideally for all Flatpak apps so I don’t have to fix this for every app i install individually.

Thanks in advance :slight_smile:

I’ve snooped around a bit and I’ve noticed something:
For one, Firefox does not seem to be installed as a Flatpak but still exhibits this behaviour
Secondly: Gnome applications installed via Flatpak don’t seem to have the same problems. It’s only other applications like VSCode, Signal or Insomnia that have this problem.

For these applications I have also noticed that if I remove the permissions for X11, the app doesn’t start anymore, leading me to believe that these applications are using XWayland

What this looks like to me is that applications that actually use Wayland as a windowing system don’t have a problem, but applications that use XWayland do have the problem. Now the question is… how do I fix this?^^ I know there’s technically xinput where you can remap some keys, but I don’t even have xinput installed and I don’t know if this also works for XWayland

…Or this might not be specifically XWayland. Firefox actually runs via Wayland as far as I can tell, but I have to disable middle mouse paste in the config so it doesn’t use the primary clipboard. Apparently VSCode has that option too. I’m not sure what to do about other applications that don’t offer me an option to disable this, but those are the two where this was most annoying, so yay.

Firefox has its own middle click behavior settings, defined in about:config with the middlemouse. prefix.

To set them, navigate to “about:config” in Firefox and search for “middlemouse”.

Here’s the specific setting you want:

http://kb.mozillazine.org/Middlemouse.paste

You probably need to set contentLoadURL to false as well:
http://kb.mozillazine.org/Middlemouse.contentLoadURL