summaryrefslogtreecommitdiffstats
path: root/Mac/Lib/FrameWork.py
diff options
context:
space:
mode:
authorJust van Rossum <just@lettererror.com>1999-01-27 14:22:11 (GMT)
committerJust van Rossum <just@lettererror.com>1999-01-27 14:22:11 (GMT)
commit5763e07ea37d7e8c520d4fb4d0fc19961bf114e0 (patch)
tree3b6cc091d65dbc942b67e267643337c6f1ccf031 /Mac/Lib/FrameWork.py
parentf09f6a5565556f20354c75024f77859e442de9e4 (diff)
downloadcpython-5763e07ea37d7e8c520d4fb4d0fc19961bf114e0.zip
cpython-5763e07ea37d7e8c520d4fb4d0fc19961bf114e0.tar.gz
cpython-5763e07ea37d7e8c520d4fb4d0fc19961bf114e0.tar.bz2
cleaned up ugly hack related to activate events and suspend/resume -- jvr
Diffstat (limited to 'Mac/Lib/FrameWork.py')
-rw-r--r--Mac/Lib/FrameWork.py22
1 files changed, 8 insertions, 14 deletions
diff --git a/Mac/Lib/FrameWork.py b/Mac/Lib/FrameWork.py
index 7d93ccb..8eafdace 100644
--- a/Mac/Lib/FrameWork.py
+++ b/Mac/Lib/FrameWork.py
@@ -357,17 +357,13 @@ class Application:
def do_activateEvt(self, event):
(what, message, when, where, modifiers) = event
- # XXXX Incorrect, should be fixed in suspendresume
- if type(message) == type(1):
- wid = WhichWindow(message)
- else:
- wid = message
+ wid = WhichWindow(message)
if wid and self._windows.has_key(wid):
window = self._windows[wid]
window.do_activate(modifiers & 1, event)
else:
MacOS.HandleEvent(event)
-
+
def do_osEvt(self, event):
(what, message, when, where, modifiers) = event
which = (message >> 24) & 0xff
@@ -377,16 +373,14 @@ class Application:
if DEBUG:
print 'unknown osEvt:',
self.printevent(event)
-
+
def do_suspendresume(self, event):
- # Is this a good idea???
(what, message, when, where, modifiers) = event
- w = FrontWindow()
- if w:
- # XXXX Incorrect, should stuff windowptr into message field
- nev = (activateEvt, w, when, where, message&1)
- self.do_activateEvt(nev)
-
+ wid = FrontWindow()
+ if wid and self._windows.has_key(wid):
+ window = self._windows[wid]
+ window.do_activate(modifiers & 1, event)
+
def do_kHighLevelEvent(self, event):
(what, message, when, where, modifiers) = event
if DEBUG: