зеркало из https://github.com/mozilla/pjs.git
re-allow generalized event dispatch for windowshaded windows, but disallow mousemoved events. fixes bugs 33735, 51649, 52950, 51642. reverts bug 49007. sorry. r=pinkerton,sfraser.
This commit is contained in:
Родитель
d44d64e41c
Коммит
bb2ba012de
|
@ -748,7 +748,17 @@ void nsMacMessagePump::DoMouseMove(EventRecord &anEvent)
|
||||||
partCode = ::FindWindow(anEvent.where, &whichWindow);
|
partCode = ::FindWindow(anEvent.where, &whichWindow);
|
||||||
if (whichWindow == nil)
|
if (whichWindow == nil)
|
||||||
whichWindow = ::FrontWindow();
|
whichWindow = ::FrontWindow();
|
||||||
DispatchOSEventToRaptor(anEvent, whichWindow);
|
|
||||||
|
/* Disable mouse moved events for windowshaded windows -- this prevents tooltips
|
||||||
|
from popping up in empty space.
|
||||||
|
*/
|
||||||
|
#if TARGET_CARBON
|
||||||
|
if (!::IsWindowCollapsed(whichWindow))
|
||||||
|
DispatchOSEventToRaptor(anEvent, whichWindow);
|
||||||
|
#else
|
||||||
|
if (!::EmptyRgn(((WindowRecord *) whichWindow)->contRgn))
|
||||||
|
DispatchOSEventToRaptor(anEvent, whichWindow);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -910,24 +920,9 @@ PRBool nsMacMessagePump::DispatchOSEventToRaptor(
|
||||||
EventRecord &anEvent,
|
EventRecord &anEvent,
|
||||||
WindowPtr aWindow)
|
WindowPtr aWindow)
|
||||||
{
|
{
|
||||||
PRBool handled = PR_FALSE;
|
if (mMessageSink->IsRaptorWindow(aWindow))
|
||||||
|
return mMessageSink->DispatchOSEvent(anEvent, aWindow);
|
||||||
if (mMessageSink->IsRaptorWindow(aWindow)) {
|
return PR_FALSE;
|
||||||
/* Suppress dispatch of events to windowshaded windows. This prevents some typical
|
|
||||||
Mac application behaviour (select something, like, a bunch of bookmarks, collapse
|
|
||||||
the window and hit delete -- this prevents the bookmarks' being deleted) and also
|
|
||||||
some surprising behaviour (tooltips are otherwise active in a collapsed window).
|
|
||||||
*/
|
|
||||||
#if TARGET_CARBON
|
|
||||||
if (!::IsWindowCollapsed(aWindow))
|
|
||||||
handled = mMessageSink->DispatchOSEvent(anEvent, aWindow);
|
|
||||||
#else
|
|
||||||
if (!::EmptyRgn(((WindowRecord *) aWindow)->contRgn))
|
|
||||||
handled = mMessageSink->DispatchOSEvent(anEvent, aWindow);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
return handled;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче