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.

This commit is contained in:
pinkerton%netscape.com 2000-10-25 01:43:53 +00:00
Родитель d4159e6dcb
Коммит fa5f216463
2 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -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;

Просмотреть файл

@ -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)