Only deiconify when iconic.
This commit is contained in:
parent
f87240f447
commit
36911a1ca9
|
@ -157,8 +157,10 @@ class EditorWindow:
|
|||
menu.configure(postcommand=self.postwindowsmenu)
|
||||
|
||||
def wakeup(self):
|
||||
self.top.tkraise()
|
||||
self.top.wm_deiconify()
|
||||
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()
|
||||
self.wm_deiconify()
|
||||
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.
|
||||
|
|
Loading…
Reference in New Issue