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 _glfwPlatformUpdateIMEState(_GLFWwindow *w, const GLFWIMEUpdateEvent *ev) {
|
|||||||
if (glfw_window && !glfw_window->decorated && glfw_window->ns.view) [self makeFirstResponder:glfw_window->ns.view];
|
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
|
@end
|
||||||
// }}}
|
// }}}
|
||||||
|
|
||||||
@ -2065,10 +2077,7 @@ void _glfwPlatformRestoreWindow(_GLFWwindow* window)
|
|||||||
void _glfwPlatformMaximizeWindow(_GLFWwindow* window)
|
void _glfwPlatformMaximizeWindow(_GLFWwindow* window)
|
||||||
{
|
{
|
||||||
if (![window->ns.object isZoomed]) {
|
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 zoom:nil];
|
||||||
[window->ns.object setResizeIncrements:original];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user