From 154da551520b276dd3505d296b474ce54a7b1b38 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 24 Jul 2026 04:53:39 +0000 Subject: [PATCH] fix: edge=none panel height shrinks with margin_top on macOS (issue #10278) --- docs/changelog.rst | 2 ++ glfw/cocoa_window.m | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 7e293edcd..ce34f1bd3 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -190,6 +190,8 @@ Detailed list of changes - Wayland: fix using remote control to resize OS windows on some tiling compositors leading to broken rendering +- macOS: fix ``edge=none`` panel height shrinking when ``margin_top`` is non-zero in the panel/quick-access-terminal kittens (:iss:`10278`) + 0.48.0 [2026-07-18] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index 86cd79f87..c48a13a4d 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -2799,7 +2799,11 @@ _glfwPlatformSetLayerShellConfig(_GLFWwindow* window, const GLFWLayerShellConfig if (height < 1.) height = NSHeight(placement_frame); } - if (config.edge != GLFW_EDGE_CENTER_SIZED) { + if (config.edge == GLFW_EDGE_NONE) { + // For edge=none the panel has a fixed size; margins only translate its position + x += config.requested_left_margin; + y -= config.requested_top_margin; + } else if (config.edge != GLFW_EDGE_CENTER_SIZED) { x += config.requested_left_margin; width -= config.requested_left_margin + config.requested_right_margin; y += config.requested_bottom_margin; height -= config.requested_top_margin + config.requested_bottom_margin; }