]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Got rid of the whole event filtering mess again, I can't get it to work. Simply disab...
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 27 Apr 2001 20:43:27 +0000 (20:43 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 27 Apr 2001 20:43:27 +0000 (20:43 +0000)
Mac/tclmods/tclMacNotify.c

index d8737ae01d1f1cc9b8b2a9b4da45986ffd466570..8fc313aee252a1853da48cbf2b1eb0eac173500e 100644 (file)
@@ -82,24 +82,6 @@ static void          InitNotifier _ANSI_ARGS_((void));
 static void            NotifierExitHandler _ANSI_ARGS_((
                            ClientData clientData));
 \f
-/*
-** Routine to determine whether Tk is the "main event handler" at the moment or
-** something else (MacPython, IDE) is.
-** Currently we only check that the frontmost window is Tk based, it may be better
-** to also check whether we're inside a Tk mainloop().
-*/
-static int
-TkIsTheBoss(void)
-{
-    WindowRef windowRef;
-
-    windowRef = FrontWindow();
-    if ( !windowRef )
-       return 0;
-    if ( TkMacGetXWindow(windowRef) )
-       return 1;
-    return 0;
-}
 /*
  *----------------------------------------------------------------------
  *
@@ -174,8 +156,6 @@ HandleMacEvents(void)
     WindowRef windowRef;
     Rect mouseRect;
 
-    if ( !TkIsTheBoss() )
-       return 0;
     /*
      * Check for mouse moved events.  These events aren't placed on the
      * system event queue unless we call WaitNextEvent.
@@ -211,13 +191,11 @@ HandleMacEvents(void)
      */
 
     while (needsUpdate || (GetEvQHdr()->qHead != NULL)) {
-       /* Give Python command-. handling a chance */
-       PyMac_DoYield(0, 0);
-       
        GetGlobalMouse(&currentMouse);
        SetRect(&mouseRect, currentMouse.h, currentMouse.v,
                currentMouse.h + 1, currentMouse.v + 1);
        RectRgn(notifier.utilityRgn, &mouseRect);
+       
        WaitNextEvent(everyEvent, &theEvent, 5, notifier.utilityRgn);
        needsUpdate = 0;
        if ((notifier.eventProcPtr != NULL)