зеркало из https://github.com/mozilla/gecko-dev.git
Fix #116774 - when in background Moz shouldn't directly test mouse button state to decide if it needs to process events (was causing Moz to peg CPU when mouse was down and it was in background). r=ccarlen,pinkerton,sr=sfraser,a=asa
This commit is contained in:
Родитель
5beb90a147
Коммит
7742579242
|
@ -374,7 +374,10 @@ PRBool nsMacMessagePump::GetEvent(EventRecord &theEvent)
|
|||
|
||||
// Make sure we call WNE if we have user events, or the mouse is down
|
||||
EventRecord tempEvent;
|
||||
PRBool havePendingEvent = ::EventAvail(kEventAvailMask, &tempEvent) || !(tempEvent.modifiers & btnState);
|
||||
// When checking btnState make sure to test if we're in the background
|
||||
PRBool havePendingEvent =
|
||||
::EventAvail(kEventAvailMask, &tempEvent) ||
|
||||
(!(tempEvent.modifiers & btnState) && nsToolkit::IsAppInForeground());
|
||||
|
||||
// don't call more than once every 4 ticks
|
||||
if (!havePendingEvent && (::TickCount() < sNextWNECall))
|
||||
|
|
Загрузка…
Ссылка в новой задаче