Closed Bug 1529605 Opened 6 years ago Closed 4 years ago

[Wayland] Support basic gestures

Categories

(Core :: Graphics, enhancement, P3)

Desktop
Linux
enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1539730
Tracking Status
firefox-esr60 --- unaffected
firefox66 --- wontfix
firefox67 --- wontfix
firefox68 --- affected

People

(Reporter: kubrick, Unassigned)

References

(Blocks 1 open bug)

Details

I'm currently using https://github.com/bulletmark/libinput-gestures on Wayland with XWayland. It works great but unfortunately, with native Wayland support, it's up the application to implement gesture support.

It would be really, REALLY, nice if firefox on Wayland could support basic gestures (for me, 3 fingers swipe left or right for previous/next page) or at least if they could be exposed to web-extensions so that the community can do their thing.

Priority: -- → P3

Marking as wontfix for 67 as Wayland support won't ship in that release.

Just for information: with Wayland it's still possible to send keyboard events to applications, but it has to be done by the compositor, not any random application. So atleast for the gnome shell there's an extension which is about to offer this (https://github.com/mpiannucci/gnome-shell-extended-gestures/pull/55).

I really would love to see that in firefox. With the recently implemented kinetic scrolling this would would make firefox the goto browser on wayland.

Small update here: Gnome 40 (the next version) will heavily extend its usage of gestures and will use three-finger swipes to left/right for switching workspaces.

In https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3528#note_999447 I was given the advice that we should use two-finger swipes for going forward/backward. That would match Epiphany/WebKitGTK as well as Firefox on MacOS behaviour, thus is probably the best way to go forward here.

IIUC what we'd need to do is to implement a swipe tracker for the Wayland backend (not sure if X11 is also feasible - wouldn't want to spent any extra time on it). So there places to look at would be widget/cocoa/SwipeTracker.mm and Epiphany. I hope I/we will find some time to look into that in the coming month so things are in place for the spring distributions.

Some more infos:

  1. The webkit gtk/gdk code can be found here: https://github.com/WebKit/WebKit/blob/main/Source/WebKit/UIProcess/gtk/ViewGestureControllerGtk.cpp
  2. Another good place to look appears to be libhandy -> hdy-swipe-tracker.c
  3. For the webkit implementation, a lot of previous MacOS code was made cross-platform
  4. In order to follow system style on Gnome, we'd have to implement something similar to libhandy/webkit
  5. FF and Chrome on MacOS don't really follow system style but just show some arrow indicators - should be much easier that way (maybe can even reuse MacOS code here?)
  6. Wayland and XI2 seem to handle scroll event equally - so doing two-finger swipes (which are actually just scroll events) can be handled for both Wayland and X11 the same way.

Botond, is it something you may be interested to implement?

Flags: needinfo?(botond)

It's not clear to me if this is the same as bug 1539730, or something different?

If it's the same, the feature is on our roadmap; please see bug 1539730 comment 5 for details.

Flags: needinfo?(botond) → needinfo?(stransky)

Yes, I guess this is basically bug 1581126 and bug 1539730, didn't know there was ongoing work! Wow, just tried apz.gtk.touchpad_pinch.enabled, that's awesome!

Flags: needinfo?(stransky)

Bug 1688717 has landed \o/

So now I suppose what's left for "basic gestures" is two-finger swiping, which is tracked in bug 1539730, so closing this as a duplicate.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.