mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
Need to make sure of two things before handling the mousewheel message:
- There must be a window under the pointer - It must be one of our windows This fixes bug 33181. r=valeski.
This commit is contained in:
parent
aa651546d8
commit
a432077333
@ -2573,7 +2573,19 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT
|
||||
point.y = (short) HIWORD(lParam);
|
||||
HWND destWnd = ::WindowFromPoint(point);
|
||||
|
||||
if (destWnd != mWnd) {
|
||||
// Since we receive mousewheel events for as long as
|
||||
// we are focused, it's entirely possible that there
|
||||
// is another app's window or no window under the
|
||||
// pointer.
|
||||
|
||||
if (!destWnd) // No window is under the pointer
|
||||
break;
|
||||
|
||||
LONG proc = ::GetWindowLong(destWnd, GWL_WNDPROC);
|
||||
if (proc != (LONG)&nsWindow::WindowProc) // Some other app
|
||||
break;
|
||||
|
||||
else if (destWnd != mWnd) {
|
||||
nsWindow* destWindow = (nsWindow*) ::GetWindowLong(destWnd, GWL_USERDATA);
|
||||
if (destWindow)
|
||||
return destWindow->ProcessMessage(msg, wParam, lParam, aRetValue);
|
||||
|
Loading…
Reference in New Issue
Block a user