@@ -42,6 +42,7 @@ def __init__( # pylint: disable=too-many-arguments, too-many-positional-argumen
4242 self .progress_window = tk .Toplevel (self .parent )
4343 # Withdraw immediately to prevent flicker while setting up
4444 self .progress_window .withdraw ()
45+ self ._is_aqua = self .progress_window .tk .call ("tk" , "windowingsystem" ) == "aqua"
4546 self .progress_window .title (title )
4647 try :
4748 dpi = self .progress_window .winfo_fpixels ("1i" )
@@ -121,7 +122,8 @@ def update_progress_bar(self, current_value: int, max_value: int) -> None:
121122 self .progress_window .deiconify ()
122123 self ._center_progress_window ()
123124 self .progress_window .lift ()
124- self .progress_window .update () # Paint pixels now
125+ if getattr (self , "_is_aqua" , False ):
126+ self .progress_window .update () # macOS needs this to paint pixels NOW
125127 self ._shown = True
126128 elif not self .only_show_when_update_progress_called :
127129 self .progress_window .lift ()
@@ -145,7 +147,7 @@ def update_progress_bar(self, current_value: int, max_value: int) -> None:
145147 # other windows while a blocking upload/download is in flight.
146148 self .progress_bar .update_idletasks ()
147149
148- if self . progress_window . tk . call ( "tk" , "windowingsystem" ) == "aqua" :
150+ if getattr ( self , "_is_aqua" , False ) :
149151 self .progress_window .update ()
150152
151153 # Close the progress window when the process is complete
0 commit comments