Back out 50f2a49570ce (bug 1085027) on suspicion of making Win7 opt mochitest-4 permaorange, a=backout

CLOSED TREE
This commit is contained in:
Phil Ringnalda 2014-10-21 23:04:42 -07:00
parent c52349da1d
commit 74fa6d6616

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|