summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/ae/aesupport.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1997-06-20 16:19:14 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1997-06-20 16:19:14 (GMT)
commit3757523f1e5cc70dbd26fa6ccb8a8a0f421201a0 (patch)
treea6a920b08fc7e2f787e698e5e4bd867623065f32 /Mac/Modules/ae/aesupport.py
parent36ed506f09b0b73d6d99341541f2dbc4b89ffe99 (diff)
downloadcpython-3757523f1e5cc70dbd26fa6ccb8a8a0f421201a0.zip
cpython-3757523f1e5cc70dbd26fa6ccb8a8a0f421201a0.tar.gz
cpython-3757523f1e5cc70dbd26fa6ccb8a8a0f421201a0.tar.bz2
Adapted to new event handling. It is now also possible to abort out of
an AESend with command-. (unless specifically disabled, of course).
Diffstat (limited to 'Mac/Modules/ae/aesupport.py')
-rw-r--r--Mac/Modules/ae/aesupport.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Mac/Modules/ae/aesupport.py b/Mac/Modules/ae/aesupport.py
index 8e4c7a3..707e956 100644
--- a/Mac/Modules/ae/aesupport.py
+++ b/Mac/Modules/ae/aesupport.py
@@ -111,7 +111,12 @@ AEEventHandlerUPP upp_GenericEventHandler;
static pascal Boolean AEIdleProc(EventRecord *theEvent, long *sleepTime, RgnHandle *mouseRgn)
{
- PyMac_Yield();
+ if ( PyOS_InterruptOccurred() )
+ return 1;
+ if ( PyMac_HandleEvent(theEvent) < 0 ) {
+ fprintf(stderr, "Exception in user event handler during AE processing\\n");
+ PyErr_Clear();
+ }
return 0;
}