Don't use SetAnimatedThemeCursor() at interrupt time. Doh! Instead just back down to using the normal watch cursor. Not as pretty, but doesn't wipe out the machine at random. r=pchen/a=sfraser, bug#52565.

git-svn-id: svn://10.0.0.236/trunk@81710 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pinkerton%netscape.com
2000-10-25 01:43:53 +00:00
parent 0c5398f1a4
commit 612b0aac0b
2 changed files with 10 additions and 2 deletions

View File

@@ -68,6 +68,12 @@ nsWatchTask :: ~nsWatchTask ( )
void
nsWatchTask :: Start ( )
{
// get the watch cursor and lock it high
CursHandle watch = ::GetCursor ( watchCursor );
if ( !watch )
return;
mWatchCursor = **watch;
// setup the task
mTask.qType = vType;
mTask.vblAddr = NewVBLProc((VBLProcPtr)DoWatchTask);
@@ -98,12 +104,12 @@ nsWatchTask :: DoWatchTask ( nsWatchTask* inSelf )
if ( !inSelf->mSuspended ) {
if ( !inSelf->mBusy && !LMGetCrsrBusy() ) {
if ( ::TickCount() - inSelf->mTicks > kTicksToShowWatch ) {
::SetAnimatedThemeCursor(kThemeWatchCursor, inSelf->mAnimation);
::SetCursor ( &(inSelf->mWatchCursor) );
inSelf->mBusy = PR_TRUE;
}
}
else
::SetAnimatedThemeCursor(kThemeWatchCursor, inSelf->mAnimation);
::SetCursor ( &(inSelf->mWatchCursor) );
// next frame in cursor animation
++inSelf->mAnimation;

View File

@@ -26,6 +26,7 @@
#include <Retrace.h>
#include <Quickdraw.h>
#include "PRTypes.h"
#include "nscore.h"
@@ -74,6 +75,7 @@ private:
long mChecksum; // 'mozz' to validate we have real data at interrupt time (not needed?)
void* mSelf; // so we can get back to |this| from the static routine
long mTicks; // last time the event loop was hit
Cursor mWatchCursor; // the watch cursor
PRPackedBool mBusy; // are we currently spinning the cursor?
PRPackedBool mSuspended; // set if we've temporarily suspended operation
PRPackedBool mInstallSucceeded; // did we succeed in installing the task? (used in dtor)