From: Jack Jansen Date: Fri, 10 Nov 1995 14:49:44 +0000 (+0000) Subject: Disable pythons own eventhandling on the mac. X-Git-Tag: v1.4b1~496 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8324836329f86204417522d9de210becf0189a09;p=thirdparty%2FPython%2Fcpython.git Disable pythons own eventhandling on the mac. --- diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index 3c2b0abf02c5..f450c828d00b 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -5,6 +5,14 @@ from _tkinter import TclError from types import * from Tkconstants import * +# XXXX Not really correct. +# The following code disables all python mainloop event handling, +# but what we really want is to disable it only for tk windows... +import os +if os.name == 'mac': + import MacOS + MacOS.EnableAppswitch(0) + CallableTypes = (FunctionType, MethodType, BuiltinFunctionType, BuiltinMethodType) diff --git a/Lib/tkinter/Tkinter.py b/Lib/tkinter/Tkinter.py index 3c2b0abf02c5..f450c828d00b 100755 --- a/Lib/tkinter/Tkinter.py +++ b/Lib/tkinter/Tkinter.py @@ -5,6 +5,14 @@ from _tkinter import TclError from types import * from Tkconstants import * +# XXXX Not really correct. +# The following code disables all python mainloop event handling, +# but what we really want is to disable it only for tk windows... +import os +if os.name == 'mac': + import MacOS + MacOS.EnableAppswitch(0) + CallableTypes = (FunctionType, MethodType, BuiltinFunctionType, BuiltinMethodType)