Skip to content

Commit

Permalink
fix the always-on-top behavior in Win10
Browse files Browse the repository at this point in the history
Windows 10 seems to set the toplevel window to "topmost" whenever its resizabi-
lity is changed. Fixed by explicitly setting that wm_attribute after every such
change.
  • Loading branch information
Noiredd committed Feb 25, 2019
1 parent ea01fc3 commit 89b407e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions filmatyk/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def __init__(self, debugMode=False):
self.updater.checkUpdates()
#prevent resizing and run the app
root.resizable(False, False)
root.wm_attributes('-topmost', 0)
tk.mainloop()

def centerWindow(self):
Expand Down
1 change: 1 addition & 0 deletions filmatyk/presenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def _confirmClick(self, event=None):
self.parent.configureColumns()
self.parent.root.root.update()
self.parent.root.root.resizable(False, False)
self.parent.root.root.wm_attributes('-topmost', 0)
# refresh items
self.parent.displayUpdate()
def centerWindow(self):
Expand Down

0 comments on commit 89b407e

Please sign in to comment.