Mercurial > cpython-lru_cache-weakref
diff Mac/Python/macglue.c @ 17629:a9485d404f05 legacy-trunk
- Raise console window on input. Fixes Carbon hang.
- Better handling of menu bar save/restore.
- Override abort() so it honours the "keep console window" flag.
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Wed, 25 Apr 2001 22:07:27 +0000 |
| parents | 728c11562187 |
| children | 8cd8741ebec0 |
line wrap: on
line diff
--- a/Mac/Python/macglue.c Wed Apr 25 22:05:36 2001 +0000 +++ b/Mac/Python/macglue.c Wed Apr 25 22:07:27 2001 +0000 @@ -685,11 +685,13 @@ */ if( in_here > 1 || !schedparams.process_events || (python_event_handler && !maycallpython) ) { + if ( maxsleep >= 0 ) { #if !TARGET_API_MAC_CARBON - if ( maxsleep >= 0 ) { SystemTask(); +#else + int xxx = 0; +#endif } -#endif } else { latest_time_ready = LMGetTicks() + maxsleep; do { @@ -768,6 +770,7 @@ { MenuHandle applemenu; + if ( sioux_mbar ) return; if ( (sioux_mbar=GetMenuBar()) == NULL ) { /* Sioux menu not installed yet. Do so */ SIOUXSetupMenus(); @@ -784,7 +787,7 @@ void PyMac_RestoreMenuBar() { -#if 0 +#if 1 /* This doesn't seem to work anymore? Or only for Carbon? */ MenuBarHandle curmenubar; @@ -799,6 +802,19 @@ #endif } +void +PyMac_RaiseConsoleWindow() +{ + /* Note: this is a hack. SIOUXTextWindow is SIOUX's internal structure + ** and we happen to know that the first entry is the window pointer. + */ + extern WindowRef *SIOUXTextWindow; + + if ( SIOUXTextWindow == NULL || *SIOUXTextWindow == NULL ) + return; + if ( FrontWindow() != *SIOUXTextWindow ) + BringToFront(*SIOUXTextWindow); +} /* ** Our replacement about box
