Bug 590035. Middle clicking tab bar with custom window drawing does not open a new tab. r=jmathies a=blocking-final
authorFelipe Gomes <felipc@gmail.com>
Thu, 02 Sep 2010 18:50:26 -0300
changeset 51932 29c3f6e7c48e0081543d57ac397b9e5e3695b4cc
parent 51931 e908e758168605446fd3f1ada5f5e14c61653861
child 51933 26cb1dc486377973880d5db9f5db705b04ab4b9a
push idunknown
push userunknown
push dateunknown
reviewersjmathies, blocking-final
bugs590035
milestone2.0b6pre
Bug 590035. Middle clicking tab bar with custom window drawing does not open a new tab. r=jmathies a=blocking-final
widget/src/windows/nsWindow.cpp
--- a/widget/src/windows/nsWindow.cpp
+++ b/widget/src/windows/nsWindow.cpp
@@ -4889,18 +4889,36 @@ PRBool nsWindow::ProcessMessage(UINT msg
 
     case WM_MBUTTONUP:
       result = DispatchMouseEvent(NS_MOUSE_BUTTON_UP, wParam, lParam, PR_FALSE,
                                   nsMouseEvent::eMiddleButton, MOUSE_INPUT_SOURCE());
       DispatchPendingEvents();
       break;
 
     case WM_MBUTTONDBLCLK:
-      result = DispatchMouseEvent(NS_MOUSE_BUTTON_DOWN, wParam, lParam, PR_FALSE,
+      result = DispatchMouseEvent(NS_MOUSE_DOUBLECLICK, wParam, lParam, PR_FALSE,
+                                  nsMouseEvent::eMiddleButton, MOUSE_INPUT_SOURCE());
+      break;
+
+    case WM_NCMBUTTONDOWN:
+      result = DispatchMouseEvent(NS_MOUSE_BUTTON_DOWN, 0, lParamToClient(lParam), PR_FALSE,
                                   nsMouseEvent::eMiddleButton, MOUSE_INPUT_SOURCE());
+      DispatchPendingEvents();
+      break;
+
+    case WM_NCMBUTTONUP:
+      result = DispatchMouseEvent(NS_MOUSE_BUTTON_UP, 0, lParamToClient(lParam), PR_FALSE,
+                                  nsMouseEvent::eMiddleButton, MOUSE_INPUT_SOURCE());
+      DispatchPendingEvents();
+      break;
+
+    case WM_NCMBUTTONDBLCLK:
+      result = DispatchMouseEvent(NS_MOUSE_DOUBLECLICK, 0, lParamToClient(lParam), PR_FALSE,
+                                  nsMouseEvent::eMiddleButton, MOUSE_INPUT_SOURCE());
+      DispatchPendingEvents();
       break;
 
     case WM_RBUTTONDOWN:
     {
       result = DispatchMouseEvent(NS_MOUSE_BUTTON_DOWN, wParam, lParam, PR_FALSE,
                                   nsMouseEvent::eRightButton, MOUSE_INPUT_SOURCE());
       DispatchPendingEvents();
     }