From 92e5bce85217ae66712e4c5ef461e7d6603cb9f2 Mon Sep 17 00:00:00 2001 From: Adam Kessel Date: Tue, 16 Jun 2026 17:30:41 -0400 Subject: [PATCH 1/4] attempt stylemask --- customtkinter/windows/widgets/ctk_floating_frame.py | 1 + 1 file changed, 1 insertion(+) diff --git a/customtkinter/windows/widgets/ctk_floating_frame.py b/customtkinter/windows/widgets/ctk_floating_frame.py index 9e996c8..8d2941d 100644 --- a/customtkinter/windows/widgets/ctk_floating_frame.py +++ b/customtkinter/windows/widgets/ctk_floating_frame.py @@ -61,6 +61,7 @@ def __init__(self, elif sys.platform.startswith("darwin"): self.transparent_color = "systemTransparent" self._toplevel.attributes("-transparent", True) + self._toplevel.wm_attributes(stylemask=("fullsizecontent", "titled")) else: #Linux doesn't support transparency, so we force the frame to cover all available space self._theme_ff_info["corner_radius"] = 0 From 31790f0730ddb145a9088dd1f39a561dccf10bed Mon Sep 17 00:00:00 2001 From: Adam Kessel Date: Tue, 16 Jun 2026 18:31:26 -0400 Subject: [PATCH 2/4] tk 9fixes --- .../windows/widgets/ctk_floating_frame.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/customtkinter/windows/widgets/ctk_floating_frame.py b/customtkinter/windows/widgets/ctk_floating_frame.py index 8d2941d..ca9a709 100644 --- a/customtkinter/windows/widgets/ctk_floating_frame.py +++ b/customtkinter/windows/widgets/ctk_floating_frame.py @@ -53,17 +53,23 @@ def __init__(self, self._toplevel.attributes("-topmost", True) self._toplevel.attributes("-alpha", 1.0 - self._theme_ff_info["transparency"]) self._toplevel.resizable(width=True, height=True) - self._toplevel.overrideredirect(True) if sys.platform.startswith("win"): + self._toplevel.overrideredirect(True) self._toplevel.attributes("-transparentcolor", self._apply_appearance_mode(self.transparent_color)) self._toplevel.attributes("-toolwindow", True) # removes icon from taskbar elif sys.platform.startswith("darwin"): - self.transparent_color = "systemTransparent" - self._toplevel.attributes("-transparent", True) - self._toplevel.wm_attributes(stylemask=("fullsizecontent", "titled")) + if tkinter.TkVersion >= 9.0: #necessary to achieve transparent edges due to changes in Tk 9.x on MacOS + self._toplevel.wm_attributes(stylemask=('fullsizecontent')) + self._toplevel.title("") + self._theme_ff_info["corner_radius"] = 0 + else: + self._toplevel.overrideredirect(True) + self.transparent_color = "systemTransparent" + self._toplevel.attributes("-transparent", True) else: #Linux doesn't support transparency, so we force the frame to cover all available space + self._toplevel.overrideredirect(True) self._theme_ff_info["corner_radius"] = 0 # frame @@ -127,6 +133,8 @@ def open(self, x_root: int, y_root: int, anchor: AnchorType = "nw") -> None: self._toplevel.geometry(f"{width}x{height}+{x_root - x_delta}+{y_root - y_delta}", apply_scaling=False) self._toplevel.deiconify() + if tkinter.TkVersion >= 9.0: #necessary to achieve transparent edges due to changes in Tk 9.x on MacOS + self._toplevel.wm_attributes(stylemask=('fullsizecontent','titled')) def close(self) -> None: """ Hides the widget. """ From ebf10db2837aeb054dd10c6cc8f9ec723f65094d Mon Sep 17 00:00:00 2001 From: Adam Kessel Date: Tue, 16 Jun 2026 19:30:21 -0400 Subject: [PATCH 3/4] fix stylemask --- customtkinter/windows/widgets/ctk_floating_frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customtkinter/windows/widgets/ctk_floating_frame.py b/customtkinter/windows/widgets/ctk_floating_frame.py index ca9a709..d675b70 100644 --- a/customtkinter/windows/widgets/ctk_floating_frame.py +++ b/customtkinter/windows/widgets/ctk_floating_frame.py @@ -60,7 +60,7 @@ def __init__(self, self._toplevel.attributes("-toolwindow", True) # removes icon from taskbar elif sys.platform.startswith("darwin"): if tkinter.TkVersion >= 9.0: #necessary to achieve transparent edges due to changes in Tk 9.x on MacOS - self._toplevel.wm_attributes(stylemask=('fullsizecontent')) + self._toplevel.wm_attributes(stylemask=('fullsizecontent','titled')) self._toplevel.title("") self._theme_ff_info["corner_radius"] = 0 else: From fa322a3d2f90df489dcdd5608521334517ff3871 Mon Sep 17 00:00:00 2001 From: Adam Kessel Date: Wed, 17 Jun 2026 17:37:55 -0400 Subject: [PATCH 4/4] limit wm_attribute reapplication to MacOS --- customtkinter/windows/widgets/ctk_floating_frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customtkinter/windows/widgets/ctk_floating_frame.py b/customtkinter/windows/widgets/ctk_floating_frame.py index d675b70..42ba27e 100644 --- a/customtkinter/windows/widgets/ctk_floating_frame.py +++ b/customtkinter/windows/widgets/ctk_floating_frame.py @@ -133,7 +133,7 @@ def open(self, x_root: int, y_root: int, anchor: AnchorType = "nw") -> None: self._toplevel.geometry(f"{width}x{height}+{x_root - x_delta}+{y_root - y_delta}", apply_scaling=False) self._toplevel.deiconify() - if tkinter.TkVersion >= 9.0: #necessary to achieve transparent edges due to changes in Tk 9.x on MacOS + if tkinter.TkVersion >= 9.0 and sys.platform.startswith("darwin"): #necessary to achieve transparent edges due to changes in Tk 9.x on MacOS self._toplevel.wm_attributes(stylemask=('fullsizecontent','titled')) def close(self) -> None: