mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-20 11:07:38 +03:00
macOS: Fix resize_in_steps being applied when double-clicking on the
title bar to maximize the window
This commit is contained in:
parent
c5149dec24
commit
f8b53df5c2
@ -1717,6 +1717,18 @@ - (void)toggleFullScreen:(nullable id)sender
|
||||
if (glfw_window && !glfw_window->decorated && glfw_window->ns.view) [self makeFirstResponder:glfw_window->ns.view];
|
||||
}
|
||||
|
||||
- (void)zoom:(id)sender
|
||||
{
|
||||
if (![self isZoomed]) {
|
||||
const NSSize original = [self resizeIncrements];
|
||||
[self setResizeIncrements:NSMakeSize(1.0, 1.0)];
|
||||
[super zoom:sender];
|
||||
[self setResizeIncrements:original];
|
||||
} else {
|
||||
[super zoom:sender];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
// }}}
|
||||
|
||||
@ -2065,10 +2077,7 @@ void _glfwPlatformRestoreWindow(_GLFWwindow* window)
|
||||
void _glfwPlatformMaximizeWindow(_GLFWwindow* window)
|
||||
{
|
||||
if (![window->ns.object isZoomed]) {
|
||||
const NSSize original = [window->ns.object resizeIncrements];
|
||||
[window->ns.object setResizeIncrements:NSMakeSize(1.0, 1.0)];
|
||||
[window->ns.object zoom:nil];
|
||||
[window->ns.object setResizeIncrements:original];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user