Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
# from logging import debug as logging_debug
# from logging import info as logging_info
from logging import error as logging_error
from platform import system as platform_system
from tkinter import messagebox, ttk
from typing import Optional, Union

Expand Down Expand Up @@ -301,7 +302,10 @@ def center_window(window: Union[tk.Toplevel, tk.Tk], parent: Union[tk.Toplevel,
x = parent.winfo_x() + (parent_width // 2) - (window_width // 2)
y = parent.winfo_y() + (parent_height // 2) - (window_height // 2)
window.geometry(f"+{x}+{y}")
window.update()
if platform_system() == "Darwin":
window.update_idletasks()
else:
window.update()
Comment on lines +305 to +308
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.

@staticmethod
def center_window_on_screen(window: Union[tk.Toplevel, tk.Tk]) -> None:
Expand Down