mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
cleaned up ugly hack related to activate events and suspend/resume -- jvr
This commit is contained in:
parent
f09f6a5565
commit
5763e07ea3
1 changed files with 8 additions and 14 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue