mirror of
https://github.com/chenasraf/webview_cef.git
synced 2026-05-18 01:49:03 +00:00
Reverses scrolling direction for non-MacOS platforms
This commit is contained in:
@@ -154,7 +154,12 @@ void WebviewHandler::sendScrollEvent(int x, int y, int deltaX, int deltaY) {
|
||||
CefMouseEvent ev;
|
||||
ev.x = x;
|
||||
ev.y = y;
|
||||
(*it)->GetHost()->SendMouseWheelEvent(ev, deltaX, deltaY);
|
||||
|
||||
#ifndef __APPLE__
|
||||
// The scrolling direction on Windows and Linux is different from MacOS
|
||||
deltaY = -deltaY;
|
||||
#endif
|
||||
(*it)->GetHost()->SendMouseWheelEvent(ev, deltaX, deltaY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user