From 3ee22e545ebfe8c54a25dc4da58ee2dde51c3494 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 10 Jul 2018 21:29:30 +0530 Subject: [PATCH] macOS: Workaround for switching from fullscreen to windowed mode with the titlebar hidden causing window resizing to not work. Fixes #711 --- docs/changelog.rst | 3 +++ kitty/glfw.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 13e0373cf..3cd4b3507 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -18,6 +18,9 @@ Changelog - macOS: Use a custom mouse cursor that shows up well on both light and dark backgrounds (:iss:`359`) +- macOS: Workaround for switching from fullscreen to windowed mode with the + titlebar hidden causing window resizing to not work. (:iss:`711`) + - Fix triple-click to select line not working when the entire line is filled (:iss:`703`) diff --git a/kitty/glfw.c b/kitty/glfw.c index a3bf42677..92432318a 100644 --- a/kitty/glfw.c +++ b/kitty/glfw.c @@ -679,6 +679,9 @@ toggle_fullscreen(PYNOARG) { const GLFWvidmode* mode = glfwGetVideoMode(monitor); if (w->before_fullscreen.is_set) glfwSetWindowMonitor(w->handle, NULL, w->before_fullscreen.x, w->before_fullscreen.y, w->before_fullscreen.w, w->before_fullscreen.h, mode->refreshRate); else glfwSetWindowMonitor(w->handle, NULL, 0, 0, 600, 400, mode->refreshRate); +#ifdef __APPLE__ + if (glfwGetCocoaWindow) cocoa_make_window_resizable(glfwGetCocoaWindow(w->handle), OPT(macos_window_resizable)); +#endif Py_RETURN_FALSE; } }