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
Родитель 9e3660de0c
Коммит 40296db318
2 изменённых файлов: 13 добавлений и 0 удалений

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

@ -526,6 +526,11 @@
type: RelaxedAtomicBool
value: true
mirror: always
- name: apz.gtk.touchpad_pinch.three_fingers.enabled
type: RelaxedAtomicBool
value: false
mirror: always
#endif
- name: apz.keyboard.enabled

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

@ -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;