summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-12-17 10:52:10 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-12-17 10:52:10 +0200
commiteab10d435a5a38c60642bf549f2a37192e2902bb (patch)
tree5123af16e15abe0c5179fe8fc7232d2bcf312141 /src
parent417b69c781cd6ee4d5600994b318a2120dbc10ed (diff)
Mobile: Wheel scrolling is not applicable
Diffstat (limited to 'src')
-rw-r--r--src/ui/documentwidget.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 4ab17b42..78c95f40 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -3905,6 +3905,9 @@ static void finishWheelSwipe_DocumentWidget_(iDocumentWidget *d) {
3905 3905
3906static iBool handleWheelSwipe_DocumentWidget_(iDocumentWidget *d, const SDL_MouseWheelEvent *ev) { 3906static iBool handleWheelSwipe_DocumentWidget_(iDocumentWidget *d, const SDL_MouseWheelEvent *ev) {
3907 iWidget *w = as_Widget(d); 3907 iWidget *w = as_Widget(d);
3908 if (deviceType_App() != desktop_AppDeviceType) {
3909 return iFalse;
3910 }
3908 if (~flags_Widget(w) & horizontalOffset_WidgetFlag) { 3911 if (~flags_Widget(w) & horizontalOffset_WidgetFlag) {
3909 return iFalse; 3912 return iFalse;
3910 } 3913 }
@@ -4064,12 +4067,14 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e
4064#endif 4067#endif
4065 } 4068 }
4066 } 4069 }
4070#if defined (iPlatformAppleDesktop)
4067 else if (ev->type == SDL_MOUSEWHEEL && 4071 else if (ev->type == SDL_MOUSEWHEEL &&
4068 ev->wheel.y == 0 && 4072 ev->wheel.y == 0 &&
4069 d->wheelSwipeState == direct_WheelSwipeState && 4073 d->wheelSwipeState == direct_WheelSwipeState &&
4070 handleWheelSwipe_DocumentWidget_(d, &ev->wheel)) { 4074 handleWheelSwipe_DocumentWidget_(d, &ev->wheel)) {
4071 return iTrue; 4075 return iTrue;
4072 } 4076 }
4077#endif
4073 else if (ev->type == SDL_MOUSEWHEEL && isHover_Widget(w)) { 4078 else if (ev->type == SDL_MOUSEWHEEL && isHover_Widget(w)) {
4074 const iInt2 mouseCoord = coord_MouseWheelEvent(&ev->wheel); 4079 const iInt2 mouseCoord = coord_MouseWheelEvent(&ev->wheel);
4075 if (isPerPixel_MouseWheelEvent(&ev->wheel)) { 4080 if (isPerPixel_MouseWheelEvent(&ev->wheel)) {