mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-23 08:47:47 +02:00
macOS: Add a new value titlebar-and-corners for :opt:hide_window_decorations that emulates the behavior of hide_window_decorations yes in older versions of kitty
This commit is contained in:
@@ -297,16 +297,12 @@ static NSUInteger getStyleMask(_GLFWwindow* window)
|
||||
NSUInteger styleMask = NSWindowStyleMaskMiniaturizable;
|
||||
if (window->ns.titlebar_hidden) styleMask |= NSWindowStyleMaskFullSizeContentView;
|
||||
|
||||
if (window->monitor || !window->decorated)
|
||||
if (window->monitor || !window->decorated) {
|
||||
styleMask |= NSWindowStyleMaskBorderless;
|
||||
else
|
||||
{
|
||||
styleMask |= NSWindowStyleMaskTitled |
|
||||
NSWindowStyleMaskClosable;
|
||||
|
||||
if (window->resizable)
|
||||
styleMask |= NSWindowStyleMaskResizable;
|
||||
} else {
|
||||
styleMask |= NSWindowStyleMaskTitled | NSWindowStyleMaskClosable;
|
||||
}
|
||||
if (window->resizable) styleMask |= NSWindowStyleMaskResizable;
|
||||
|
||||
return styleMask;
|
||||
}
|
||||
@@ -3021,6 +3017,11 @@ GLFWAPI void glfwCocoaSetWindowChrome(GLFWwindow *w, unsigned int color, bool us
|
||||
window->ns.titlebar_hidden = true;
|
||||
show_text_in_titlebar = false;
|
||||
break;
|
||||
case 4:
|
||||
decorations_desc = "no-titlebar-and-no-corners";
|
||||
window->decorated = false;
|
||||
has_shadow = true;
|
||||
break;
|
||||
default:
|
||||
window->decorated = true;
|
||||
has_shadow = true;
|
||||
|
||||
Reference in New Issue
Block a user