summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-04-27 20:43:27 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-04-27 20:43:27 (GMT)
commite9bcb5c766635575ac33376fd4da6a38a86ddff1 (patch)
tree74e9a4af5e8b452866ff22f44a242029188ef862 /Mac
parentddc4fd03b1eadeab65f8e0dbf5b6f386ed419fbc (diff)
downloadcpython-e9bcb5c766635575ac33376fd4da6a38a86ddff1.zip
cpython-e9bcb5c766635575ac33376fd4da6a38a86ddff1.tar.gz
cpython-e9bcb5c766635575ac33376fd4da6a38a86ddff1.tar.bz2
Got rid of the whole event filtering mess again, I can't get it to work. Simply disabling the Tk event handling hook in _tkinter is not as nice, but at least it works.
Diffstat (limited to 'Mac')
-rw-r--r--Mac/tclmods/tclMacNotify.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/Mac/tclmods/tclMacNotify.c b/Mac/tclmods/tclMacNotify.c
index d8737ae..8fc313a 100644
--- a/Mac/tclmods/tclMacNotify.c
+++ b/Mac/tclmods/tclMacNotify.c
@@ -83,24 +83,6 @@ static void NotifierExitHandler _ANSI_ARGS_((
ClientData clientData));
/*
-** 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;
-}
-/*
*----------------------------------------------------------------------
*
* InitNotifier --
@@ -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)