Commit 0ac710d8 authored by Guido van Rossum's avatar Guido van Rossum

Only deiconify when iconic.

parent 37e3447d
......@@ -157,8 +157,10 @@ class EditorWindow:
menu.configure(postcommand=self.postwindowsmenu)
def wakeup(self):
self.top.tkraise()
if self.top.wm_state() == "iconic":
self.top.wm_deiconify()
else:
self.top.tkraise()
self.text.focus_set()
menu_specs = [
......
......@@ -49,8 +49,10 @@ class ListedToplevel(Toplevel):
def wakeup(self):
try:
self.tkraise()
if self.wm_state() == "iconic":
self.wm_deiconify()
else:
self.tkraise()
self.focus_set()
except TclError:
# This can happen when the window menu was torn off.
......
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