Touchpad gesture support (e.g. for zooming via touchpad pinch gestures)

Tomaž Vajngerl quikee at gmail.com
Thu Aug 25 17:23:08 UTC 2022


Hi,

On Thu, Aug 25, 2022 at 12:16 PM Povilas Kanapickas <povilas at radix.lt>
wrote:

> Hello,
>
> I would like to implement support for touchpad gesture handling to
> LibreOffice. This is useful e.g. for zooming views using two-finger
> pinch touchpad gesture or rotating objects using two-finger rotate gesture.
>
> I have implemented this functionality in GIMP and would like to do the
> same for LibreOffice. In LibreOffice case the implementation will be
> more complex, as there are more backends than just GTK, but this will
> just require more work.
>
> There is a proof of concept implementation that wires touchpad gestures
> on GTK to the ViewShell widget. As a result it's possible to use
> touchpad pinch gesture to zoom in-out the main slide in Impress.
>
> https://gerrit.libreoffice.org/c/core/+/138791/1 (note that
> implementation is split across 5 changes in the chain).
>
> Please let me know what do you think about this problem and the proof of
> concept solution.
>

Looks great.

The reason why GestureEvent is called so generally is that there should
only be one common gesture event for all types of gestures - even if that
would also mean it would have all the member variables of all the gestures
- for simplicity. But I guess that approach is also ok...


> I would like to eventually add touchpad gesture support to all UI
> elements of LibreOffice where that makes sense.
>

I have experimented with panning support years ago - maybe some code
pointers will be useful.

https://pastebin.com/2xHfSe8B


> Cheers,
> Povilas
>

Tomaž
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20220825/bc1c2fa8/attachment.htm>


More information about the LibreOffice mailing list