diff --git a/docs/changelog.rst b/docs/changelog.rst index 842529351..617bf24c3 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -100,6 +100,8 @@ Detailed list of changes - Add option :option:`kitten @ detach-window --stay-in-tab` to keep focus in the currently active tab when moving windows (:iss:`7468`) +- macOS: Fix changing window chrome/colors while in traditional fullscreen causing the titlebar to become visible (:iss:`7469`) + 0.34.1 [2024-04-19] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index 132073750..0bf94da54 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -3161,7 +3161,11 @@ GLFWAPI void glfwCocoaSetWindowChrome(GLFWwindow *w, unsigned int color, bool us // event. See https://github.com/kovidgoyal/kitty/issues/7106 NSWindowStyleMask fsmask = current_style_mask & NSWindowStyleMaskFullScreen; window->ns.pre_full_screen_style_mask = getStyleMask(window); - [window->ns.object setStyleMask:window->ns.pre_full_screen_style_mask | fsmask]; + if (in_fullscreen && window->ns.in_traditional_fullscreen) { + [window->ns.object setStyleMask:NSWindowStyleMaskBorderless]; + } else { + [window->ns.object setStyleMask:window->ns.pre_full_screen_style_mask | fsmask]; + } // HACK: Changing the style mask can cause the first responder to be cleared [window->ns.object makeFirstResponder:window->ns.view]; }}