зеркало из https://github.com/mozilla/pjs.git
Added a check for a null hWnd on call to ScreenToClient, DESTROY event
can cause wHnd to be null
This commit is contained in:
Родитель
378d3283fb
Коммит
10d673027c
|
@ -257,10 +257,14 @@ void nsWindow::InitEvent(nsGUIEvent& event, PRUint32 aEventType, nsPoint* aPoint
|
|||
cpos.x = LOWORD(pos);
|
||||
cpos.y = HIWORD(pos);
|
||||
|
||||
::ScreenToClient(mWnd, &cpos);
|
||||
|
||||
event.point.x = cpos.x;
|
||||
event.point.y = cpos.y;
|
||||
if (mWnd != NULL) {
|
||||
::ScreenToClient(mWnd, &cpos);
|
||||
event.point.x = 0;
|
||||
event.point.y = 0;
|
||||
} else {
|
||||
event.point.x = cpos.x;
|
||||
event.point.y = cpos.y;
|
||||
}
|
||||
}
|
||||
else { // use the point override if provided
|
||||
event.point.x = aPoint->x;
|
||||
|
|
Загрузка…
Ссылка в новой задаче