зеркало из https://github.com/mozilla/pjs.git
don't dispatch mouseMoved events when Raptor is in the background
This commit is contained in:
Родитель
5ea6581e3b
Коммит
7f450c2134
|
@ -30,6 +30,7 @@
|
|||
#define botRight(r) (((Point *) &(r))[1])
|
||||
#endif
|
||||
|
||||
PRBool nsMacEventHandler::mInBackground = PR_FALSE;
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
|
@ -100,8 +101,20 @@ PRBool nsMacEventHandler::HandleOSEvent(
|
|||
break;
|
||||
|
||||
case osEvt:
|
||||
unsigned char eventType = ((aOSEvent.message >> 24) & 0x00ff);
|
||||
if (eventType == suspendResumeMessage)
|
||||
{
|
||||
if ((aOSEvent.message & 1) == resumeFlag)
|
||||
mInBackground = PR_FALSE; // resume message
|
||||
else
|
||||
mInBackground = PR_TRUE; // suspend message
|
||||
break;
|
||||
}
|
||||
// no break;
|
||||
|
||||
case nullEvent:
|
||||
retVal = HandleMouseMoveEvent(aOSEvent);
|
||||
if (! mInBackground)
|
||||
retVal = HandleMouseMoveEvent(aOSEvent);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,6 +57,8 @@ protected:
|
|||
PRBool mMouseInWidgetHit;
|
||||
nsWindow* mLastWidgetPointed;
|
||||
RgnHandle mUpdateRgn;
|
||||
static PRBool mInBackground;
|
||||
|
||||
};
|
||||
|
||||
#endif // MacMacEventHandler_h__
|
||||
|
|
Загрузка…
Ссылка в новой задаче