mirror of
https://github.com/chenasraf/webview_cef.git
synced 2026-05-18 01:49:03 +00:00
@@ -154,7 +154,17 @@ void WebviewHandler::sendScrollEvent(int x, int y, int deltaX, int deltaY) {
|
||||
CefMouseEvent ev;
|
||||
ev.x = x;
|
||||
ev.y = y;
|
||||
|
||||
#ifndef __APPLE__
|
||||
// The scrolling direction on Windows and Linux is different from MacOS
|
||||
deltaY = -deltaY;
|
||||
// Flutter scrolls too slowly, it looks more normal by 10x default speed.
|
||||
(*it)->GetHost()->SendMouseWheelEvent(ev, deltaX * 10, deltaY * 10);
|
||||
#else
|
||||
(*it)->GetHost()->SendMouseWheelEvent(ev, deltaX, deltaY);
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user