Bug 1702855 - Disable three-finger touchpad pinch gestures on Linux by default. r=tnikkel

Differential Revision: https://phabricator.services.mozilla.com/D111201
This commit is contained in:
Botond Ballo
2021-04-08 01:15:42 +00:00
parent 21a8d03f89
commit cb1b3be904
2 changed files with 13 additions and 0 deletions

View File

@@ -4287,6 +4287,14 @@ bool nsWindow::IsHandlingTouchSequence(GdkEventSequence* aSequence) {
gboolean nsWindow::OnTouchpadPinchEvent(GdkEventTouchpadPinch* aEvent) {
if (StaticPrefs::apz_gtk_touchpad_pinch_enabled()) {
// Do not respond to pinch gestures involving more than two fingers
// unless specifically preffed on. These are sometimes hooked up to other
// actions at the desktop environment level and having the browser also
// pinch can be undesirable.
if (aEvent->n_fingers > 2 &&
!StaticPrefs::apz_gtk_touchpad_pinch_three_fingers_enabled()) {
return FALSE;
}
PinchGestureInput::PinchGestureType pinchGestureType =
PinchGestureInput::PINCHGESTURE_SCALE;
ScreenCoord CurrentSpan;