Bug 782729 - Make Windows nsWindow::SynthesizeNativeMouseEvent accept coords in screen coords, not widget coords, to match other widget implementations. r=smaug,jimm
authorChris Pearce <cpearce@mozilla.com>
Tue, 18 Sep 2012 14:36:16 +1200
changeset 108065 1f87f13f8da46fa36b82fcf9d9c7ac998560b802
parent 108064 74a9ba7336cfae0813d62955f3de4344aa20a635
child 108066 a88b3cd6f28d86b61aaa46a65d039afd2fa69948
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewerssmaug, jimm
bugs782729
milestone18.0a1
Bug 782729 - Make Windows nsWindow::SynthesizeNativeMouseEvent accept coords in screen coords, not widget coords, to match other widget implementations. r=smaug,jimm
widget/windows/nsWindow.cpp
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -5836,19 +5836,17 @@ nsWindow::SynthesizeNativeKeyEvent(int32
   return NS_OK;
 }
 
 nsresult
 nsWindow::SynthesizeNativeMouseEvent(nsIntPoint aPoint,
                                      uint32_t aNativeMessage,
                                      uint32_t aModifierFlags)
 {
-  RECT r;
-  ::GetWindowRect(mWnd, &r);
-  ::SetCursorPos(r.left + aPoint.x, r.top + aPoint.y);
+  ::SetCursorPos(aPoint.x, aPoint.y);
 
   INPUT input;
   memset(&input, 0, sizeof(input));
 
   input.type = INPUT_MOUSE;
   input.mi.dwFlags = aNativeMessage;
   ::SendInput(1, &input, sizeof(INPUT));