summaryrefslogtreecommitdiffstats
path: root/Mac/Python/macglue.c
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-04-25 22:07:27 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-04-25 22:07:27 (GMT)
commit15f1c08d96da1792548d2e3cf17ebd7dd9ba078e (patch)
tree3a00bcd0b7ff7cae2ab0c08003f2198d36b80207 /Mac/Python/macglue.c
parentee677913df35c8c4c5ea91e3c85a3061f01bb26d (diff)
downloadcpython-15f1c08d96da1792548d2e3cf17ebd7dd9ba078e.zip
cpython-15f1c08d96da1792548d2e3cf17ebd7dd9ba078e.tar.gz
cpython-15f1c08d96da1792548d2e3cf17ebd7dd9ba078e.tar.bz2
- 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.
Diffstat (limited to 'Mac/Python/macglue.c')
-rw-r--r--Mac/Python/macglue.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/Mac/Python/macglue.c b/Mac/Python/macglue.c
index 52bc225..5579735 100644
--- a/Mac/Python/macglue.c
+++ b/Mac/Python/macglue.c
@@ -685,11 +685,13 @@ PyMac_DoYield(int maxsleep, int maycallpython)
*/
if( in_here > 1 || !schedparams.process_events ||
(python_event_handler && !maycallpython) ) {
-#if !TARGET_API_MAC_CARBON
if ( maxsleep >= 0 ) {
+#if !TARGET_API_MAC_CARBON
SystemTask();
- }
+#else
+ int xxx = 0;
#endif
+ }
} else {
latest_time_ready = LMGetTicks() + maxsleep;
do {
@@ -768,6 +770,7 @@ PyMac_InitMenuBar()
{
MenuHandle applemenu;
+ if ( sioux_mbar ) return;
if ( (sioux_mbar=GetMenuBar()) == NULL ) {
/* Sioux menu not installed yet. Do so */
SIOUXSetupMenus();
@@ -784,7 +787,7 @@ PyMac_InitMenuBar()
void
PyMac_RestoreMenuBar()
{
-#if 0
+#if 1
/* This doesn't seem to work anymore? Or only for Carbon? */
MenuBarHandle curmenubar;
@@ -799,6 +802,19 @@ PyMac_RestoreMenuBar()
#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