InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.64k stars 907 forks source link

WIP: DisplayApp: Use LVGL gestures #1686

Closed Riksu9000 closed 6 months ago

Riksu9000 commented 1 year ago

I was investigating issue #1685 and found that it can be fixed by using LVGL gestures.

Communicating hardware gestures to LVGL is tricky, because there's no built in support for it. Using LVGL gestures, we only need the touch coordinates from the touch panel. Following up, OnTouchEvent functions can be replaced by LVGL event handlers.

TODO:

Relates to #1011 Fixes #1685

github-actions[bot] commented 1 year ago
Build size and comparison to main: Section Size Difference
text 406652B 16B
data 940B 0B
bss 53568B 0B
Riksu9000 commented 1 year ago

A major issue I noticed is that the full gesture must happen on a single object. If I drag a sufficient distance, but the drag passes multiple objects, a gesture event will not happen. This happens even if the objects' gesture parent is set to true, which means the object ignores gestures and the parent (screen) should handle them. If we can't find a solution to this issue, we need to keep another gesture handler besides LVGL.