From 651c50e8276e629f8f7d12f8b9ba6493e84031b7 Mon Sep 17 00:00:00 2001 From: "pinkerton%netscape.com" Date: Wed, 25 Oct 2000 01:43:53 +0000 Subject: [PATCH] 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. --- gfx/src/mac/nsWatchTask.cpp | 10 ++++++++-- gfx/src/mac/nsWatchTask.h | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gfx/src/mac/nsWatchTask.cpp b/gfx/src/mac/nsWatchTask.cpp index 7ff15bd26c1..5ef40573a43 100644 --- a/gfx/src/mac/nsWatchTask.cpp +++ b/gfx/src/mac/nsWatchTask.cpp @@ -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; diff --git a/gfx/src/mac/nsWatchTask.h b/gfx/src/mac/nsWatchTask.h index 7d0fbd771ee..d2830a6d094 100644 --- a/gfx/src/mac/nsWatchTask.h +++ b/gfx/src/mac/nsWatchTask.h @@ -26,6 +26,7 @@ #include +#include #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)