mirror of https://github.com/python/cpython.git
Don't traceback when wakeup() is called when the window has been destroyed.
This can happen when a torn-of Windows menu references closed windows. And Tim Peters claims that the Windows menu is his favorite to tear off...
This commit is contained in:
parent
f52cca9812
commit
2403b0c5d4
|
@ -48,6 +48,11 @@ def get_title(self):
|
|||
return self.wm_title()
|
||||
|
||||
def wakeup(self):
|
||||
try:
|
||||
self.tkraise()
|
||||
self.wm_deiconify()
|
||||
self.focus_set()
|
||||
except TclError:
|
||||
# This can happen when the window menu was torn off.
|
||||
# Simply ignore it.
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue