From 2dd5f95279467d9da2a2dcfff598191a2295d72c Mon Sep 17 00:00:00 2001 From: "Jerry.Kirk%Nexwarecorp.com" Date: Thu, 18 Nov 1999 12:43:43 +0000 Subject: [PATCH] Added new static memer mModalCount to be used when a modal dialog is created. Now calling PtModalStart/End, this fixed the problem with widgets not highlighting properly when the mouse moved over them on a modal dialog. r=kedl git-svn-id: svn://10.0.0.236/trunk@53876 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/src/photon/nsAppShell.cpp | 16 ++++++++++++++-- mozilla/widget/src/photon/nsAppShell.h | 3 ++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/mozilla/widget/src/photon/nsAppShell.cpp b/mozilla/widget/src/photon/nsAppShell.cpp index 82d75e85bdd..f36234a14a7 100644 --- a/mozilla/widget/src/photon/nsAppShell.cpp +++ b/mozilla/widget/src/photon/nsAppShell.cpp @@ -36,6 +36,8 @@ #include PRBool nsAppShell::mPtInited = PR_FALSE; +int nsAppShell::mModalCount = -1; + nsIEventQueue *kedlEQueue = nsnull; /* Global Definitions */ @@ -267,7 +269,15 @@ NS_IMETHODIMP nsAppShell::Create(int *bac, char **bav) //------------------------------------------------------------------------- NS_METHOD nsAppShell::Spinup() { - PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsAppShell::Spinup - Not Implemented.\n")); + PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsAppShell::Spinup this=<%p> mModalCount=<%d>\n", this, mModalCount)); + if (mModalCount != -1) + { + /* This should be -1 here... what is wrong? */ + NS_ASSERTION(0,"nsAppShell::Spinup mModalCount is not -1!\n"); + abort(); + } + + mModalCount = PtModalStart(); return NS_OK; } @@ -278,7 +288,9 @@ NS_METHOD nsAppShell::Spinup() //------------------------------------------------------------------------- NS_METHOD nsAppShell::Spindown() { - PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsAppShell::Spindown - Not Implemented.\n")); + PR_LOG(PhWidLog, PR_LOG_DEBUG, ("nsAppShell::Spindown this=<%p> mModalCount=<%d>\n", this, mModalCount)); + PtModalEnd( mModalCount ); + mModalCount = -1; return NS_OK; } diff --git a/mozilla/widget/src/photon/nsAppShell.h b/mozilla/widget/src/photon/nsAppShell.h index b720e0d6b66..e0756e9f5a8 100644 --- a/mozilla/widget/src/photon/nsAppShell.h +++ b/mozilla/widget/src/photon/nsAppShell.h @@ -60,7 +60,8 @@ private: nsDispatchListener *mDispatchListener; EventQueueTokenQueue *mEventQueueTokens; static PRBool mPtInited; - + static int mModalCount; + // unsigned long mEventBufferSz; // PhEvent_t *mEvent; // nsIEventQueueService * mEventQService;