mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-25 03:49:42 +00:00
Fixed the mouseRgn in WaitNextEvent in order not to continuously send mouseMoved events.
This commit is contained in:
parent
81bed3109b
commit
b29a5d79cd
@ -105,13 +105,15 @@ nsMacMessagePump::DoMessagePump()
|
||||
|
||||
// calculate the region to watch
|
||||
RgnHandle mouseRgn = ::NewRgn();
|
||||
::SetRectRgn(mouseRgn, -32000, -32000, -32001, -32001);
|
||||
|
||||
while (mRunning)
|
||||
{
|
||||
::LMSetSysEvtMask(eventMask); // we need keyUp events
|
||||
haveEvent = ::WaitNextEvent(eventMask, &theEvent, sleep, mouseRgn);
|
||||
|
||||
Point globalMouse = theEvent.where;
|
||||
::SetRectRgn(mouseRgn, globalMouse.h, globalMouse.v, globalMouse.h + 1, globalMouse.v + 1);
|
||||
|
||||
if (haveEvent)
|
||||
{
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user