diff options
| author | Miro Jurisic <meeroh@mit.edu> | 1998-07-14 15:14:45 +0000 |
|---|---|---|
| committer | Miro Jurisic <meeroh@mit.edu> | 1998-07-14 15:14:45 +0000 |
| commit | b8d2f6d034fc130db717926456dec676e86c11e2 (patch) | |
| tree | d6bf07f6a6e07d78a417041c0f081118509aabaf /src | |
| parent | 332ac0e7d27d1ad520469c61199987a96e6cef68 (diff) | |
| download | krb5-b8d2f6d034fc130db717926456dec676e86c11e2.tar.gz krb5-b8d2f6d034fc130db717926456dec676e86c11e2.tar.xz krb5-b8d2f6d034fc130db717926456dec676e86c11e2.zip | |
Mac: now calling NewCWindow when possible; changed GetNextEvent to WaitNextEvent
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10635 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
| -rw-r--r-- | src/util/et/com_err.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/util/et/com_err.c b/src/util/et/com_err.c index 37e3d987c..7ae2a23c7 100644 --- a/src/util/et/com_err.c +++ b/src/util/et/com_err.c @@ -163,6 +163,8 @@ static void MacMessageBox(errbuf) EventRecord theEvent; Point localPt; Boolean done; + long gestaltResult; + OSErr theError; /* Find Centered rect for window */ tmpRect.top = ((mainRect.bottom + mainRect.top)/2 - @@ -173,8 +175,13 @@ static void MacMessageBox(errbuf) tmpRect.right = tmpRect.left + (errRect.right - errRect.left); /* Create the error window - as a dialog window */ - errWindow = NewWindow(NULL, &tmpRect, "\p", TRUE, - dBoxProc, (WindowPtr) -1, FALSE, 0L); + /* First check if we have color QuickDraw */ + /* (we can assume we have Gestalt because we are on system 7) */ + theError = Gestalt (gestaltQuickdrawFeatures, &gestaltResult); + if ((theError == noErr) && (gestaltResult & (1 << gestaltHasColor) != 0)) + errWindow = NewCWindow(NULL, &tmpRect, "\p", TRUE, dBoxProc, (WindowPtr) -1, FALSE, 0L); + else + errWindow = NewWindow(NULL, &tmpRect, "\p", TRUE, dBoxProc, (WindowPtr) -1, FALSE, 0L); SetPort(errWindow); TextFont(systemFont); @@ -198,7 +205,7 @@ static void MacMessageBox(errbuf) /* mini event loop here */ done = FALSE; while(!done) { - GetNextEvent(mDownMask | mUpMask | keyDownMask, &theEvent); + WaitNextEvent(mDownMask | mUpMask | keyDownMask, &theEvent, 15, nil); if (theEvent.what == mouseDown) { localPt = theEvent.where; GlobalToLocal(&localPt); |
