mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
macOS; Fix restoring from fullscreen when resize increments are enabled
This commit is contained in:
@@ -1601,7 +1601,11 @@ void _glfwPlatformUpdateIMEState(_GLFWwindow *w, const GLFWIMEUpdateEvent *ev) {
|
|||||||
{
|
{
|
||||||
if (glfw_window && glfw_window->ns.toggleFullscreenCallback && glfw_window->ns.toggleFullscreenCallback((GLFWwindow*)glfw_window) == 1)
|
if (glfw_window && glfw_window->ns.toggleFullscreenCallback && glfw_window->ns.toggleFullscreenCallback((GLFWwindow*)glfw_window) == 1)
|
||||||
return;
|
return;
|
||||||
|
// When resizeIncrements is set, Cocoa cannot restore the original window size after returning from fullscreen.
|
||||||
|
const NSSize original = [self resizeIncrements];
|
||||||
|
[self setResizeIncrements:NSMakeSize(1.0, 1.0)];
|
||||||
[super toggleFullScreen:sender];
|
[super toggleFullScreen:sender];
|
||||||
|
[self setResizeIncrements:original];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
Reference in New Issue
Block a user