summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2017-12-18 16:10:58 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-02-12 15:56:16 +0100
commit1201510514c4c0a556359e893912f8a90f8c6adb (patch)
treef9f5679dce07e4a16fcc34a2cd9b74d6610a0d96
parent4686be40b280142bb372d16e91b60e96e4c3bd34 (diff)
downloadUXP-1201510514c4c0a556359e893912f8a90f8c6adb.tar
UXP-1201510514c4c0a556359e893912f8a90f8c6adb.tar.gz
UXP-1201510514c4c0a556359e893912f8a90f8c6adb.tar.lz
UXP-1201510514c4c0a556359e893912f8a90f8c6adb.tar.xz
UXP-1201510514c4c0a556359e893912f8a90f8c6adb.zip
Use more logical pref names for mouse button 4&5
Also improves comment wording.
-rw-r--r--modules/libpref/init/all.js11
-rw-r--r--widget/windows/nsWindow.cpp17
2 files changed, 15 insertions, 13 deletions
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
index d91ac0c8b..da610f47d 100644
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -2227,11 +2227,12 @@ pref("clipboard.autocopy", false);
pref("clipboard.plainTextOnly", false);
#ifdef XP_WIN
-// 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.
-pref("mousebutton.4th.enabled", true);
-pref("mousebutton.5th.enabled", true);
+// Mouse 4th/5th button handling
+// Setting these to false allows you to disable the 4th and/or 5th button of
+// your mouse. The 4th button is typically mapped to "Back" and the 5th
+// button is typically mapped to "Forward".
+pref("mouse.button4.enabled", true);
+pref("mouse.button5.enabled", true);
#endif
// mouse wheel scroll transaction period of time (in milliseconds)
diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp
index 85321a189..e721267ba 100644
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -5589,12 +5589,13 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
DispatchPendingEvents();
break;
- // Windows doesn't provide to customize the behavior of 4th nor 5th button
- // of mouse. If 5-button mouse works with standard mouse deriver of
- // Windows, users cannot disable 4th button (browser back) nor 5th button
- // (browser forward). We should allow to do it with our prefs since we can
- // prevent Windows to generate WM_APPCOMMAND message if WM_XBUTTONUP
- // messages are not sent to DefWindowProc.
+ // Windows doesn't provide a way to customize the behavior of 4th or 5th
+ // button of a mouse. If a 5-button mouse works with the standard mouse
+ // driver of Windows, users cannot disable the 4th button (browser back)
+ // nor the 5th button (browser forward).
+ // We can disable it here with our prefs since we can prevent Windows
+ // from generating WM_APPCOMMAND messages if WM_XBUTTONUP messages are
+ // not sent to DefWindowProc.
case WM_XBUTTONDOWN:
case WM_XBUTTONUP:
case WM_NCXBUTTONDOWN:
@@ -5602,10 +5603,10 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
*aRetValue = TRUE;
switch (GET_XBUTTON_WPARAM(wParam)) {
case XBUTTON1:
- result = !Preferences::GetBool("mousebutton.4th.enabled", true);
+ result = !Preferences::GetBool("mouse.button4.enabled", true);
break;
case XBUTTON2:
- result = !Preferences::GetBool("mousebutton.5th.enabled", true);
+ result = !Preferences::GetBool("mouse.button5.enabled", true);
break;
default:
break;