Merge mozilla-central to mozilla-inbound to fix perma failures on a CLOSED TREE

This commit is contained in:
Carsten "Tomcat" Book 2014-10-22 09:49:51 +02:00
commit adf725283f

View File

@ -3132,12 +3132,20 @@ NS_METHOD nsWindow::EnableDragDrop(bool aEnable)
NS_METHOD nsWindow::CaptureMouse(bool aCapture)
{
TRACKMOUSEEVENT mTrack;
mTrack.cbSize = sizeof(TRACKMOUSEEVENT);
mTrack.dwFlags = TME_LEAVE;
mTrack.dwHoverTime = 0;
if (aCapture) {
mTrack.hwndTrack = mWnd;
::SetCapture(mWnd);
} else {
mTrack.hwndTrack = nullptr;
::ReleaseCapture();
}
sIsInMouseCapture = aCapture;
// Requests WM_MOUSELEAVE events for this window.
TrackMouseEvent(&mTrack);
return NS_OK;
}
@ -4857,15 +4865,6 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
case WM_MOUSEMOVE:
{
if (!mMousePresent) {
TRACKMOUSEEVENT tme;
tme.cbSize = sizeof(TRACKMOUSEEVENT);
tme.dwFlags = TME_LEAVE;
tme.hwndTrack = mWnd;
// Request WM_MOUSELEAVE events for this window.
TrackMouseEvent(&tme);
}
mMousePresent = true;
// Suppress dispatch of pending events
@ -4933,12 +4932,6 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
}
break;
case WM_NCMOUSELEAVE:
// If upon mouse leave event, only WM_NCMOUSELEAVE message is sent, sending WM_MOUSELEAVE message
// makes the event being properly handled.
SendMessage(mWnd, WM_MOUSELEAVE, 0, 0);
break;
case WM_CONTEXTMENU:
{
// if the context menu is brought up from the keyboard, |lParam|