From 3260953a367743389b1a5d6ab80b8a5e1f097af4 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 8 Nov 2025 11:40:23 -0800 Subject: [PATCH] Fix focus when launched, something changed after Python 3.9.6. Throwing everything at the wall here. --- PGUI.pyw | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PGUI.pyw b/PGUI.pyw index 244e1c4..2bd6069 100644 --- a/PGUI.pyw +++ b/PGUI.pyw @@ -148,7 +148,8 @@ def main(argv): pgui = PGUILauncher(root) 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() 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.deiconify() + root.focus() + root.after(100, lambda: pgui.filter_entry.focus_force()) root.mainloop() if __name__ == '__main__':