зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1617803 - Support 4th and 5th mouse button disabling pref on Linux r=karlt
Some users may want to disable 4th and 5th button of mouse. This feature has already been implemented on Windows, and our GTK widget can support this with this simple patch. Differential Revision: https://phabricator.services.mozilla.com/D64721 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
be55ac8482
Коммит
2caf69bffb
|
@ -2387,7 +2387,7 @@ pref("middlemouse.scrollbarPosition", false);
|
|||
// Clipboard only supports text/plain
|
||||
pref("clipboard.plainTextOnly", false);
|
||||
|
||||
#ifdef XP_WIN
|
||||
#if defined(XP_WIN) || defined(MOZ_WIDGET_GTK)
|
||||
// Setting false you can disable 4th button and/or 5th button of your mouse.
|
||||
// 4th button is typically mapped to "Back" and 5th button is typically mapped
|
||||
// to "Forward" button.
|
||||
|
|
|
@ -3027,9 +3027,15 @@ void nsWindow::OnButtonPressEvent(GdkEventButton* aEvent) {
|
|||
return;
|
||||
// Map buttons 8-9 to back/forward
|
||||
case 8:
|
||||
if (!Preferences::GetBool("mousebutton.4th.enabled", true)) {
|
||||
return;
|
||||
}
|
||||
DispatchCommandEvent(nsGkAtoms::Back);
|
||||
return;
|
||||
case 9:
|
||||
if (!Preferences::GetBool("mousebutton.5th.enabled", true)) {
|
||||
return;
|
||||
}
|
||||
DispatchCommandEvent(nsGkAtoms::Forward);
|
||||
return;
|
||||
default:
|
||||
|
|
Загрузка…
Ссылка в новой задаче