From f16d1f034fbb958f8ca77c78951f865d1a0fabeb Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Wed, 11 Sep 2024 00:37:47 +0300 Subject: [PATCH] Switched swipe-to-reply processing on macOS from touch to scroll events. --- Telegram/SourceFiles/history/history_view_swipe.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/history/history_view_swipe.cpp b/Telegram/SourceFiles/history/history_view_swipe.cpp index 041664e87..cca7a4daa 100644 --- a/Telegram/SourceFiles/history/history_view_swipe.cpp +++ b/Telegram/SourceFiles/history/history_view_swipe.cpp @@ -191,7 +191,7 @@ void SetupSwipeHandler( const auto t = static_cast(e.get()); const auto touchscreen = t->device() && (t->device()->type() == base::TouchDevice::TouchScreen); - if (!Platform::IsMac() && !touchscreen) { + if (/*!Platform::IsMac() && */!touchscreen) { break; } else if (type == QEvent::TouchBegin) { // Reset state in case we lost some TouchEnd. @@ -235,6 +235,7 @@ void SetupSwipeHandler( case QEvent::Wheel: { const auto w = static_cast(e.get()); const auto phase = w->phase(); +#if 0 #ifdef Q_OS_MAC if (phase == Qt::ScrollBegin) { state->twoFingerScrollStarted = true; @@ -246,7 +247,8 @@ void SetupSwipeHandler( state->twoFingerScrollStarted = false; } #endif // Q_OS_MAC - if (Platform::IsMac() || phase == Qt::NoScrollPhase) { +#endif + if (/*Platform::IsMac() || */phase == Qt::NoScrollPhase) { break; } else if (phase == Qt::ScrollBegin) { // Reset state in case we lost some TouchEnd.