Fix titlebar color not working for opaque windows

As long as titlebar_color is not nil, we need a background view
This commit is contained in:
Kovid Goyal
2025-09-29 22:36:27 +05:30
parent 75ec41e08b
commit a8e930c167

View File

@@ -3434,7 +3434,7 @@ GLFWAPI void glfwCocoaSetWindowChrome(GLFWwindow *w, unsigned int color, bool us
} else {
[nsw setStyleMask:window->ns.pre_full_screen_style_mask | fsmask];
}
if (background_opacity < 1.0 && !window->ns.titlebar_hidden && window->decorated && titlebar_color != nil && titlebar_transparent) {
if (!window->ns.titlebar_hidden && window->decorated && titlebar_color != nil && titlebar_transparent) {
set_title_bar_background(nsw, titlebar_color);
} else clear_title_bar_background_views(nsw);
// HACK: Changing the style mask can cause the first responder to be cleared