mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-21 20:52:19 +00:00
macOS; Fix restoring from fullscreen when resize increments are enabled
This commit is contained in:
parent
518e0f4e21
commit
edd423aad6
1 changed files with 4 additions and 0 deletions
|
|
@ -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)
|
||||
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];
|
||||
[self setResizeIncrements:original];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue