diff --git a/customtkinter/windows/ctk_tk.py b/customtkinter/windows/ctk_tk.py index e137dc3c..a2dc2665 100644 --- a/customtkinter/windows/ctk_tk.py +++ b/customtkinter/windows/ctk_tk.py @@ -278,6 +278,7 @@ def _windows_set_titlebar_color(self, color_mode: str): super().withdraw() # hide window so that it can be redrawn after the titlebar change so that the color change is visible else: # print("window dont exists -> withdraw and update") + self._state_before_windows_set_titlebar_color = self.state() self.focused_widget_before_widthdraw = self.focus_get() super().withdraw() super().update()