зеркало из https://github.com/mozilla/pjs.git
more fixes for 53017. r=hyatt
This commit is contained in:
Родитель
2073a1e101
Коммит
d1f1660c54
|
@ -1059,6 +1059,7 @@ PRBool nsMacEventHandler::HandleActivateEvent(EventRecord& aOSEvent)
|
|||
nsWindow* focusedWidget = mTopLevelWidget;
|
||||
if(!active) {
|
||||
gEventDispatchHandler.SetActivated(focusedWidget);
|
||||
mTopLevelWidget->SetIsActive(PR_TRUE);
|
||||
}
|
||||
|
||||
// Twiddle menu bars
|
||||
|
@ -1093,6 +1094,7 @@ PRBool nsMacEventHandler::HandleActivateEvent(EventRecord& aOSEvent)
|
|||
#endif
|
||||
// Dispatch an NS_DEACTIVATE event
|
||||
gEventDispatchHandler.SetDeactivated(mTopLevelWidget);
|
||||
mTopLevelWidget->SetIsActive(PR_FALSE);
|
||||
}
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
|
|
@ -271,6 +271,7 @@ nsMacWindow::nsMacWindow() : Inherited()
|
|||
, mIsDialog(PR_FALSE)
|
||||
, mMacEventHandler(nsnull)
|
||||
, mAcceptsActivation(PR_TRUE)
|
||||
, mIsActive(PR_FALSE)
|
||||
{
|
||||
//mMacEventHandler.reset(new nsMacEventHandler(this));
|
||||
mMacEventHandler = (auto_ptr<nsMacEventHandler>) new nsMacEventHandler(this);
|
||||
|
@ -911,7 +912,12 @@ NS_IMETHODIMP nsMacWindow::PasswordFieldInit()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
void nsMacWindow::SetIsActive(PRBool aActive)
|
||||
{
|
||||
mIsActive = aActive;
|
||||
}
|
||||
|
||||
void nsMacWindow::IsActive(PRBool* aActive)
|
||||
{
|
||||
*aActive = NS_REINTERPRET_CAST(WindowPeek, mWindowPtr)->hilited;
|
||||
*aActive = mIsActive;
|
||||
}
|
|
@ -106,6 +106,7 @@ public:
|
|||
void MoveToGlobalPoint(PRInt32 aX, PRInt32 aY);
|
||||
|
||||
void IsActive(PRBool* aActive);
|
||||
void SetIsActive(PRBool aActive);
|
||||
protected:
|
||||
|
||||
pascal static OSErr DragTrackingHandler ( DragTrackingMessage theMessage, WindowPtr theWindow,
|
||||
|
@ -120,6 +121,7 @@ protected:
|
|||
auto_ptr<nsMacEventHandler> mMacEventHandler;
|
||||
nsIWidget *mOffsetParent;
|
||||
PRBool mAcceptsActivation;
|
||||
PRBool mIsActive;
|
||||
};
|
||||
|
||||
#endif // MacWindow_h__
|
||||
|
|
Загрузка…
Ссылка в новой задаче