Commit 5763e07e authored by Just van Rossum's avatar Just van Rossum

cleaned up ugly hack related to activate events and suspend/resume -- jvr

parent f09f6a55
...@@ -357,11 +357,7 @@ class Application: ...@@ -357,11 +357,7 @@ class Application:
def do_activateEvt(self, event): def do_activateEvt(self, event):
(what, message, when, where, modifiers) = event (what, message, when, where, modifiers) = event
# XXXX Incorrect, should be fixed in suspendresume
if type(message) == type(1):
wid = WhichWindow(message) wid = WhichWindow(message)
else:
wid = message
if wid and self._windows.has_key(wid): if wid and self._windows.has_key(wid):
window = self._windows[wid] window = self._windows[wid]
window.do_activate(modifiers & 1, event) window.do_activate(modifiers & 1, event)
...@@ -379,13 +375,11 @@ class Application: ...@@ -379,13 +375,11 @@ class Application:
self.printevent(event) self.printevent(event)
def do_suspendresume(self, event): def do_suspendresume(self, event):
# Is this a good idea???
(what, message, when, where, modifiers) = event (what, message, when, where, modifiers) = event
w = FrontWindow() wid = FrontWindow()
if w: if wid and self._windows.has_key(wid):
# XXXX Incorrect, should stuff windowptr into message field window = self._windows[wid]
nev = (activateEvt, w, when, where, message&1) window.do_activate(modifiers & 1, event)
self.do_activateEvt(nev)
def do_kHighLevelEvent(self, event): def do_kHighLevelEvent(self, event):
(what, message, when, where, modifiers) = event (what, message, when, where, modifiers) = event
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment