Only deiconify when iconic.
This commit is contained in:
parent
f87240f447
commit
36911a1ca9
|
@ -157,8 +157,10 @@ class EditorWindow:
|
||||||
menu.configure(postcommand=self.postwindowsmenu)
|
menu.configure(postcommand=self.postwindowsmenu)
|
||||||
|
|
||||||
def wakeup(self):
|
def wakeup(self):
|
||||||
self.top.tkraise()
|
if self.top.wm_state() == "iconic":
|
||||||
self.top.wm_deiconify()
|
self.top.wm_deiconify()
|
||||||
|
else:
|
||||||
|
self.top.tkraise()
|
||||||
self.text.focus_set()
|
self.text.focus_set()
|
||||||
|
|
||||||
menu_specs = [
|
menu_specs = [
|
||||||
|
|
|
@ -49,8 +49,10 @@ class ListedToplevel(Toplevel):
|
||||||
|
|
||||||
def wakeup(self):
|
def wakeup(self):
|
||||||
try:
|
try:
|
||||||
self.tkraise()
|
if self.wm_state() == "iconic":
|
||||||
self.wm_deiconify()
|
self.wm_deiconify()
|
||||||
|
else:
|
||||||
|
self.tkraise()
|
||||||
self.focus_set()
|
self.focus_set()
|
||||||
except TclError:
|
except TclError:
|
||||||
# This can happen when the window menu was torn off.
|
# This can happen when the window menu was torn off.
|
||||||
|
|
Loading…
Reference in New Issue