2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 00:46:08 +00:00

Fix swipe gestures on touchscreens.

This commit is contained in:
John Preston
2025-03-14 14:36:01 +04:00
parent 044ef3447c
commit 34858b36c1
12 changed files with 140 additions and 51 deletions

View File

@@ -2972,7 +2972,7 @@ bool InnerWidget::processTouchEvent(not_null<QTouchEvent*> e) {
}
if (_chatPreviewTouchGlobal) {
const auto delta = (*_chatPreviewTouchGlobal - *point);
if (delta.manhattanLength() > _st->photoSize) {
if (delta.manhattanLength() >= QApplication::startDragDistance()) {
cancelChatPreview();
}
}
@@ -2981,7 +2981,7 @@ bool InnerWidget::processTouchEvent(not_null<QTouchEvent*> e) {
return _dragging != nullptr;
} else if (_touchDragStartGlobal) {
const auto delta = (*_touchDragStartGlobal - *point);
if (delta.manhattanLength() > QApplication::startDragDistance()) {
if (delta.manhattanLength() >= QApplication::startDragDistance()) {
if (_touchDragPinnedTimer.isActive()) {
_touchDragPinnedTimer.cancel();
_touchDragStartGlobal = {};