Fix focus when launched, something changed after Python 3.9.6.

Throwing everything at the wall here.
This commit is contained in:
voussoir 2025-11-08 11:40:23 -08:00
parent 9d5ced0cea
commit 3260953a36

View file

@ -148,7 +148,8 @@ def main(argv):
pgui = PGUILauncher(root) pgui = PGUILauncher(root)
pgui.pack(fill=tkinter.BOTH, expand=True) pgui.pack(fill=tkinter.BOTH, expand=True)
pgui.filter_entry.focus() pgui.filter_entry.focus_set()
pgui.filter_entry.focus_force()
width = root.winfo_reqwidth() width = root.winfo_reqwidth()
height = root.winfo_reqheight() height = root.winfo_reqheight()
@ -157,6 +158,8 @@ def main(argv):
root.geometry('%dx%d+%d+%d' % (width, height, x_offset, y_offset-50)) root.geometry('%dx%d+%d+%d' % (width, height, x_offset, y_offset-50))
root.deiconify() root.deiconify()
root.focus()
root.after(100, lambda: pgui.filter_entry.focus_force())
root.mainloop() root.mainloop()
if __name__ == '__main__': if __name__ == '__main__':