mirror of https://github.com/python/cpython
- A forgotten "from Carbon".
- Made the "killed unknown window" code dependent on a global var, so you can easily turn the behaviour off for IDE debugging.
This commit is contained in:
parent
4d3052acb0
commit
dc4d925be9
|
@ -3,12 +3,13 @@ from Carbon import Win
|
||||||
from Carbon import Qd
|
from Carbon import Qd
|
||||||
from Carbon import Evt
|
from Carbon import Evt
|
||||||
import MacOS
|
import MacOS
|
||||||
import Events
|
from Carbon import Events
|
||||||
import traceback
|
import traceback
|
||||||
from types import *
|
from types import *
|
||||||
|
|
||||||
from Carbon import Menu; MenuToolbox = Menu; del Menu
|
from Carbon import Menu; MenuToolbox = Menu; del Menu
|
||||||
|
|
||||||
|
KILLUNKNOWNWINDOWS=1 # Set to 0 for debugging.
|
||||||
|
|
||||||
class Application(FrameWork.Application):
|
class Application(FrameWork.Application):
|
||||||
|
|
||||||
|
@ -184,7 +185,7 @@ class Application(FrameWork.Application):
|
||||||
window = self._windows[wid]
|
window = self._windows[wid]
|
||||||
window.do_rawupdate(wid, event)
|
window.do_rawupdate(wid, event)
|
||||||
else:
|
else:
|
||||||
if wid:
|
if KILLUNKNOWNWINDOWS and wid:
|
||||||
wid.HideWindow()
|
wid.HideWindow()
|
||||||
import sys
|
import sys
|
||||||
sys.stderr.write("XXX killed unknown (crashed?) Python window.\n")
|
sys.stderr.write("XXX killed unknown (crashed?) Python window.\n")
|
||||||
|
|
Loading…
Reference in New Issue