mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Adapted to new event handling. It is now also possible to abort out of
an AESend with command-. (unless specifically disabled, of course).
This commit is contained in:
parent
36ed506f09
commit
3757523f1e
2 changed files with 12 additions and 2 deletions
|
@ -72,7 +72,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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue