Skip to content

Commit

Permalink
macOS: Fix changing window chrome/colors while in traditional fullscr…
Browse files Browse the repository at this point in the history
…een causing the titlebar to become visible

Fixes #7469
  • Loading branch information
kovidgoyal committed May 23, 2024
1 parent 15d8601 commit 9acca04
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
6 changes: 5 additions & 1 deletion glfw/cocoa_window.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}}
Expand Down

0 comments on commit 9acca04

Please sign in to comment.