Changed how window.bring_to_front is implemented on Windows
This commit is contained in:
parent
351bcfa170
commit
a0ffc7a1b1
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
|
|
||||||
version = __version__ = "4.14.0.1 Unreleased - blank Text element sized to default element size, removed X-margin for row frames, added events for Calendar button but may remove"
|
version = __version__ = "4.14.1.3 Unreleased - blank Text element sized to default element size, added events for Calendar button but may remove, changed how bring_to_front works on Windows, SetIcon bug fix"
|
||||||
|
|
||||||
port = 'PySimpleGUI'
|
port = 'PySimpleGUI'
|
||||||
|
|
||||||
|
@ -6351,10 +6351,19 @@ class Window:
|
||||||
Brings this window to the top of all other windows (perhaps may not be brought before a window made to "stay
|
Brings this window to the top of all other windows (perhaps may not be brought before a window made to "stay
|
||||||
on top")
|
on top")
|
||||||
"""
|
"""
|
||||||
try:
|
if sys.platform.startswith('win'):
|
||||||
self.TKroot.lift()
|
try:
|
||||||
except:
|
self.TKroot.wm_attributes("-topmost", 0)
|
||||||
pass
|
self.TKroot.wm_attributes("-topmost", 1)
|
||||||
|
if not self.KeepOnTop:
|
||||||
|
self.TKroot.wm_attributes("-topmost", 0)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
self.TKroot.lift()
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
def SendToBack(self):
|
def SendToBack(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue