зеркало из https://github.com/mozilla/gecko-dev.git
fix for 45238, add kung-fu death grip on widget while we're processing the event. r=saari.
This commit is contained in:
Родитель
6d6fa85d8e
Коммит
db28e724cb
|
@ -1204,7 +1204,8 @@ PRBool nsMacEventHandler::HandleMouseDownEvent(EventRecord& aOSEvent)
|
|||
if ( aOSEvent.modifiers & controlKey )
|
||||
mouseButton = NS_MOUSE_RIGHT_BUTTON_DOWN;
|
||||
ConvertOSEventToMouseEvent(aOSEvent, mouseEvent, mouseButton);
|
||||
nsWindow* widgetHit = (nsWindow*)mouseEvent.widget;
|
||||
nsCOMPtr<nsIWidget> kungFuDeathGrip ( mouseEvent.widget ); // ensure widget doesn't go away
|
||||
nsWindow* widgetHit = NS_STATIC_CAST(nsWindow*, mouseEvent.widget); // while we're processing event
|
||||
if (widgetHit)
|
||||
{
|
||||
// set the activation and focus on the widget hit, if it accepts it
|
||||
|
|
Загрузка…
Ссылка в новой задаче