diff --git a/docs/changelog.rst b/docs/changelog.rst index 8b125c9dc..dbe1ef19e 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -32,6 +32,9 @@ Changelog - macOS: Fix rendering frames-per-second very low when processing large amounts of input in small chunks (:pull:`1082`) +- macOS: Fix incorrect text sizes calaculated when using an external display + that is set to mirror the main display (:iss:`1056`) + - Linux: Fix match rules used as aliases in Fontconfig configuration not being respected (:iss:`1085`) diff --git a/kitty/glfw.c b/kitty/glfw.c index 215f03e95..d679b0706 100644 --- a/kitty/glfw.c +++ b/kitty/glfw.c @@ -343,6 +343,9 @@ get_window_dpi(GLFWwindow *w, double *x, double *y) { if (monitor == NULL) { PyErr_Print(); monitor = glfwGetPrimaryMonitor(); } float xscale = 1, yscale = 1; if (monitor) glfwGetMonitorContentScale(monitor, &xscale, &yscale); + if (!xscale || !yscale) glfwGetMonitorContentScale(glfwGetPrimaryMonitor(), &xscale, &yscale); + if (!xscale) xscale = 1.0; + if (!yscale) yscale = 1.0; #ifdef __APPLE__ double factor = 72.0; #else