]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Disable pythons own eventhandling on the mac.
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 10 Nov 1995 14:49:44 +0000 (14:49 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 10 Nov 1995 14:49:44 +0000 (14:49 +0000)
Lib/lib-tk/Tkinter.py
Lib/tkinter/Tkinter.py

index 3c2b0abf02c57ce7ce10f8fc1aee06c84880c395..f450c828d00b61cba72a05b0ac7d197b41b55422 100644 (file)
@@ -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)
 
index 3c2b0abf02c57ce7ce10f8fc1aee06c84880c395..f450c828d00b61cba72a05b0ac7d197b41b55422 100755 (executable)
@@ -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)