mate-desktop / mate-settings-daemon

MATE settings daemon
https://mate-desktop.org
GNU General Public License v2.0
43 stars 47 forks source link

xsettings: add setting to enable/disable primary paste from middlemouse #234

Closed lukefromdc closed 6 years ago

lukefromdc commented 6 years ago

Requires https://github.com/mate-desktop/mate-desktop/pull/332 to add the necessary gsettings key in "interface." Default is "enabled" to avoid any change in expected behavior with a default install.

lukefromdc commented 6 years ago

Rebased after https://github.com/mate-desktop/mate-settings-daemon/commit/66b5931c274c0fadffeaecaa8e021e9b8e0e7761

raveit65 commented 6 years ago

How is this testable with pluma? Edit: Do i need a pluma PR/commit?

raveit65 commented 6 years ago

Ok, the new gsettings key has an influence to mate-terminal. Enable/disable midlemouse-paste works here.

lukefromdc commented 6 years ago

This works exactly the same way GNOME does it, and was cut and pasted from there.

The PRIMARY buffer can't be emptied, only replaced by selecting other text. Some users (myself included) find that middlemouse paste is uncontrollable and have to disable it to function. In Firefox there is a key in about:config for this, and newer builds disable it by default. You can lose your work in Firefox by accidently middle clicking if this is enabled.

EDIT: also note that it is possible to disable middlemouse paste by adding gtk-enable-primary-paste=false to ~/.local/gtk-3.0/settings.ini but few users are aware of that. I did this work after Pluma commit https://github.com/mate-desktop/pluma/commit/4d26225d475b16de3de4aca3b6e0587d0ded3984 removed the ability to empty the primary clipboard by deselecting text, which for many users was a nasty bug limiting their ability to effectively use middlemouse paste in Pluma. I wanted users to be able to easily configure this without having to search online for obscure methods, this the related PR for mate-control-center https://github.com/mate-desktop/mate-control-center/pull/369

Question: do we want to add a security notice in the description of the gsettings key here and in the menu item for mate-control-center>mouse?

vkareh commented 6 years ago

I don't think it's necessary - if for some reason I want to clear my primary, I automatically double-click any other random word elsewhere, it's muscle memory at this point. Since this only affects some apps in GTK, the behavior is not consistent enough to warrant a warning. That said, I'm not opposed to it either, so if you want to write something up, I'd be happy to approve it :)

mdmayfield commented 6 years ago

Some users (myself included) find that middlemouse paste is uncontrollable and have to disable it to function.

@lukefromdc out of curiosity, is this related to a clickpad registering a middle click if your thumb strays too far toward the middle? If so, I've found that setting the xinput property "middle mouse button emulation" resolves that so that a middle click can only be done by simultaneous right and left click.

lukefromdc commented 6 years ago

No, I'm normally on a desktop and a desktop mouse.