Clean up Tk root widget

I was hoping this would fix the Python rocket icon showing in the dock on macOS, but it doesn't. It still stays until the program exits.
Might still be good to do though.
This commit is contained in:
Isaiah Odhner 2023-07-18 17:16:29 -04:00
parent e2308c2a91
commit 5c7272db91

View File

@ -3618,7 +3618,9 @@ Columns: {len(palette) // 2}
import tkinter
root = tkinter.Tk()
root.withdraw()
return root.winfo_screenwidth(), root.winfo_screenheight()
size = root.winfo_screenwidth(), root.winfo_screenheight()
root.destroy()
return size
except Exception as e:
print("Failed to get screen size:", e)
return 1920, 1080