From 51156be7b49acef77283dd586fdf56ea47473b7e Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Fri, 11 Mar 2016 19:10:44 +0800 Subject: [PATCH] Bug 1244546 part 1 - Apply proper unit conversion for SynthesizeNativeMouseEvent. r=karlt MozReview-Commit-ID: 6XLzx7CyFEj --HG-- extra : source : 5c61d059fc06b04456ab69c608d98e1e9433619d --- widget/gtk/nsWindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp index 1d6f21df6549..e72077145fb6 100644 --- a/widget/gtk/nsWindow.cpp +++ b/widget/gtk/nsWindow.cpp @@ -6823,7 +6823,8 @@ nsWindow::SynthesizeNativeMouseEvent(LayoutDeviceIntPoint aPoint, // aNativeMessage != GDK_BUTTON_RELEASE we'll synthesize a motion event // that will be emitted by gdk_display_warp_pointer(). GdkScreen* screen = gdk_window_get_screen(mGdkWindow); - gdk_display_warp_pointer(display, screen, aPoint.x, aPoint.y); + GdkPoint point = DevicePixelsToGdkPointRoundDown(aPoint); + gdk_display_warp_pointer(display, screen, point.x, point.y); } return NS_OK;