Make nsBaseAppShell::mRunWasCalled accessible to subclasses. Fixes mac bustage.

git-svn-id: svn://10.0.0.236/trunk@196260 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
darin%meer.net 2006-05-10 17:56:10 +00:00
parent 506ad714d2
commit 08efbf2eba
3 changed files with 10 additions and 2 deletions

View File

@ -152,7 +152,7 @@ nsAppShell::Init()
void
nsAppShell::ProcessGeckoEvents()
{
if (mRunWasCalled) {
if (RunWasCalled()) {
// We own the run loop. Interrupt it. It will be started again later
// (unless exiting) by nsBaseAppShell. Trust me, I'm a doctor.
[NSApp stop:nil];

View File

@ -212,7 +212,7 @@ nsAppShell::ProcessGeckoEvents(void* aInfo)
{
nsAppShell* self = NS_STATIC_CAST(nsAppShell*, aInfo);
if (self->mRunWasCalled) {
if (self->RunWasCalled()) {
// We own the run loop. Interrupt it. It will be started again later
// (unless exiting) by nsBaseAppShell. Trust me, I'm a doctor.
::QuitApplicationEventLoop();

View File

@ -91,6 +91,14 @@ protected:
*/
virtual PRBool ProcessNextNativeEvent(PRBool mayWait) = 0;
/**
* Indicates whether or not nsIAppShell::Run was called. In an embedding
* application, the embedder usually spins up a native event loop on their
* own and does not call nsIAppShell::Run. In such cases, we have to go to
* extra lengths to properly hook ourselves into that native event loop.
*/
PRBool RunWasCalled() { return mRunWasCalled; }
private:
PRBool DoProcessNextNativeEvent(PRBool mayWait);