Commit 784ba78a authored by wez@chromium.org's avatar wez@chromium.org

Supply X & Y deltas in the right order when creating new-style wheel events.

This fixes the scroll-wheel axes being swapped when connecting to Mac hosts.

BUG=155960


Review URL: https://chromiumcodereview.appspot.com/11140047

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162185 0039d316-1c4b-4281-b951-d872f2087c98
parent 06c84e40
......@@ -205,7 +205,7 @@ void EventExecutorMac::InjectMouseEvent(const MouseEvent& event) {
int delta_y = static_cast<int>(event.wheel_delta_y());
base::mac::ScopedCFTypeRef<CGEventRef> event(
CGEventCreateScrollWheelEvent(
NULL, kCGScrollEventUnitPixel, 2, delta_x, delta_y));
NULL, kCGScrollEventUnitPixel, 2, delta_y, delta_x));
if (event)
CGEventPost(kCGHIDEventTap, event);
} else if (event.has_wheel_offset_x() && event.has_wheel_offset_y()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment