Yet another macOS save button fix with dialog popup#1332
Conversation
Signed-off-by: Omkar Sarkar <omkarsarkar24@gmail.com>
There was a problem hiding this comment.
Pull request overview
Updates Tkinter window centering behavior to avoid macOS-specific UI issues when forcing a window refresh.
Changes:
- Add OS detection via
platform.system(). - Use
update_idletasks()on macOS (Darwin) instead ofupdate()after setting geometry.
| if platform_system() == "Darwin": | ||
| window.update_idletasks() | ||
| else: | ||
| window.update() |
There was a problem hiding this comment.
This introduces platform-specific behavior without documenting why macOS needs update_idletasks() while other platforms use update(). Please add a short inline comment explaining the underlying issue/bug being worked around (e.g., what update() triggers on macOS) so future changes don’t accidentally regress it.
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
|
Yes, I tested it and it worked perfectly this time! The popups show up right along with the button without any freezing. It's amazing how hard I was trying to fix it and how simple your solution was. Thank you for stepping in and doing this. I'm going to review your changes to see where I went wrong. |
|
Thanks for testing! I merged it to master and will close the other PR |
Much simpler than #1304
Closes #1264
@OmkarSarkar204 can you please test this one?