mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-11 14:45:31 +03:00
macOS: Fix an abort when changing OS window chrome for a full screen window via remote control or the themes kitten
Fixes #7106
This commit is contained in:
parent
62347d7e97
commit
7c14e0d666
@ -66,6 +66,8 @@ Detailed list of changes
|
||||
- hints kitten: Respect the kitty :opt:`url_excluded_characters` option
|
||||
(:iss:`7075`)
|
||||
|
||||
- macOS: Fix an abort when changing OS window chrome for a full screen window via remote control or the themes kitten (:iss:`7106`)
|
||||
|
||||
0.32.1 [2024-01-26]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
@ -2292,6 +2292,7 @@ int _glfwPlatformFramebufferTransparent(_GLFWwindow* window)
|
||||
void _glfwPlatformSetWindowResizable(_GLFWwindow* window, bool enabled UNUSED)
|
||||
{
|
||||
[window->ns.object setStyleMask:getStyleMask(window)];
|
||||
[window->ns.object makeFirstResponder:window->ns.view];
|
||||
}
|
||||
|
||||
void _glfwPlatformSetWindowDecorated(_GLFWwindow* window, bool enabled UNUSED)
|
||||
@ -3133,8 +3134,11 @@ GLFWAPI void glfwCocoaSetWindowChrome(GLFWwindow *w, unsigned int color, bool us
|
||||
[[window->ns.object standardWindowButton: NSWindowCloseButton] setHidden:hide_titlebar_buttons];
|
||||
[[window->ns.object standardWindowButton: NSWindowMiniaturizeButton] setHidden:hide_titlebar_buttons];
|
||||
[[window->ns.object standardWindowButton: NSWindowZoomButton] setHidden:hide_titlebar_buttons];
|
||||
// Apple throws a hissy fit if one attempts to clear the value of NSWindowStyleMaskFullScreen outside of a full screen transition
|
||||
// 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];
|
||||
[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];
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user