mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 14:46:03 +00: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
1 changed files with 12 additions and 3 deletions
|
|
@ -1717,6 +1717,18 @@ void _glfwPlatformUpdateIMEState(_GLFWwindow *w, const GLFWIMEUpdateEvent *ev) {
|
|||
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…
Add table
Add a link
Reference in a new issue