11#include " touchhandler/TouchHandler.h"
2- #ifdef PINETIME_IS_RECOVERY
3- #include " displayapp/DummyLittleVgl.h"
4- #else
5- #include " displayapp/LittleVgl.h"
6- #endif
72
83using namespace Pinetime ::Controllers;
94using namespace Pinetime ::Applications;
@@ -32,14 +27,7 @@ namespace {
3227 }
3328}
3429
35- TouchHandler::TouchHandler (Drivers::Cst816S& touchPanel, Components::LittleVgl& lvgl) : touchPanel {touchPanel}, lvgl {lvgl} {
36- }
37-
38- void TouchHandler::CancelTap () {
39- if (info.touching ) {
40- isCancelled = true ;
41- lvgl.SetNewTouchPoint (-1 , -1 , true );
42- }
30+ TouchHandler::TouchHandler (Drivers::Cst816S& touchPanel) : touchPanel {touchPanel} {
4331}
4432
4533Pinetime::Applications::TouchEvents TouchHandler::GestureGet () {
@@ -55,6 +43,7 @@ bool TouchHandler::GetNewTouchInfo() {
5543 return false ;
5644 }
5745
46+ // Only a single gesture per touch
5847 if (info.gesture != Pinetime::Drivers::Cst816S::Gestures::None) {
5948 if (gestureReleased) {
6049 if (info.gesture == Pinetime::Drivers::Cst816S::Gestures::SlideDown ||
@@ -78,18 +67,3 @@ bool TouchHandler::GetNewTouchInfo() {
7867
7968 return true ;
8069}
81-
82- void TouchHandler::UpdateLvglTouchPoint () {
83- if (info.touching ) {
84- if (!isCancelled) {
85- lvgl.SetNewTouchPoint (info.x , info.y , true );
86- }
87- } else {
88- if (isCancelled) {
89- lvgl.SetNewTouchPoint (-1 , -1 , false );
90- isCancelled = false ;
91- } else {
92- lvgl.SetNewTouchPoint (info.x , info.y , false );
93- }
94- }
95- }
0 commit comments