Bug 1856627 [Linux] Use BTN_FORWARD (mouse button 10) to web navigate forward r=emilio

Recently we use BTN_SIDE (Button 8) to navigate web back, BTN_EXTRA (Button 9) to navigate web forward.
In this patch add BTN_FORWARD (Button 10) to also navigate web forward.

Differential Revision: https://phabricator.services.mozilla.com/D190153
This commit is contained in:
stransky 2023-10-05 10:21:39 +00:00
Родитель b237a3cd5d
Коммит d46db64f3b
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -3459,7 +3459,7 @@ nsresult nsWindow::SetTitle(const nsAString& aTitle) {
if (!mShell) return NS_OK;
// convert the string into utf8 and set the title.
#define UTF8_FOLLOWBYTE(ch) (((ch)&0xC0) == 0x80)
#define UTF8_FOLLOWBYTE(ch) (((ch) & 0xC0) == 0x80)
NS_ConvertUTF16toUTF8 titleUTF8(aTitle);
if (titleUTF8.Length() > NS_WINDOW_TITLE_MAX_LENGTH) {
// Truncate overlong titles (bug 167315). Make sure we chop after a
@ -4686,7 +4686,7 @@ void nsWindow::OnButtonPressEvent(GdkEventButton* aEvent) {
case 7:
NS_WARNING("We're not supporting legacy horizontal scroll event");
return;
// Map buttons 8-9 to back/forward
// Map buttons 8-9(10) to back/forward
case 8:
if (!Preferences::GetBool("mousebutton.4th.enabled", true)) {
return;
@ -4694,6 +4694,7 @@ void nsWindow::OnButtonPressEvent(GdkEventButton* aEvent) {
DispatchCommandEvent(nsGkAtoms::Back);
return;
case 9:
case 10:
if (!Preferences::GetBool("mousebutton.5th.enabled", true)) {
return;
}