From 0321ca04f0ad2714bf97c949d7274d91f245ecc2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 17 Mar 2026 20:14:02 +0530 Subject: [PATCH] Cleanup previous PR Fix leak of sub view and ensure child window has correct color space --- docs/changelog.rst | 2 ++ glfw/cocoa_window.m | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 38ea1c9e5..7bad40b67 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -180,6 +180,8 @@ Detailed list of changes - choose files kitten: Fix a regression that caused incorrect highlight of matched letters +- macOS: When using :opt:`macos_traditional_fullscreen` do not render content under the notch (:pull:`9678`) + 0.46.1 [2026-03-16] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index d44df8fa2..73bdad025 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -3386,6 +3386,7 @@ bool _glfwPlatformIsFullscreen(_GLFWwindow* w, unsigned int flags) { [bg_window setOpaque:NO]; [bg_window setIgnoresMouseEvents:YES]; [bg_window setReleasedWhenClosed:NO]; + [bg_window setColorSpace:[window colorSpace]]; // Add a colored subview only in the notch strip area NSView *notchView = [[NSView alloc] initWithFrame:NSMakeRect(0, sf.size.height - insetTop, sf.size.width, insetTop)]; notchView.wantsLayer = YES; @@ -3398,6 +3399,7 @@ bool _glfwPlatformIsFullscreen(_GLFWwindow* w, unsigned int flags) { [bg_window.contentView addSubview:notchView]; [window addChildWindow:bg_window ordered:NSWindowBelow]; w->ns.notch_cover_window = bg_window; + [notchView release]; } }