macOS: Fix resize_in_steps not working correctly on high DPI screens
See #4114
This commit is contained in:
@@ -87,6 +87,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
||||
- macOS: Fix :kbd:`ctrl+shift` with :kbd:`Esc or Function keys` not working
|
||||
(:iss:`4109`)
|
||||
|
||||
- macOS: Fix :opt:`resize_in_steps` not working correctly on high DPI screens
|
||||
(:iss:`4114`)
|
||||
|
||||
|
||||
0.23.1 [2021-08-17]
|
||||
----------------------
|
||||
|
||||
@@ -1875,10 +1875,13 @@ void _glfwPlatformSetWindowAspectRatio(_GLFWwindow* window, int numer, int denom
|
||||
|
||||
void _glfwPlatformSetWindowSizeIncrements(_GLFWwindow* window, int widthincr, int heightincr)
|
||||
{
|
||||
if (widthincr != GLFW_DONT_CARE && heightincr != GLFW_DONT_CARE)
|
||||
[window->ns.object setResizeIncrements:NSMakeSize(widthincr, heightincr)];
|
||||
else
|
||||
if (widthincr != GLFW_DONT_CARE && heightincr != GLFW_DONT_CARE) {
|
||||
float xscale = 1, yscale = 1;
|
||||
_glfwPlatformGetWindowContentScale(window, &xscale, &yscale);
|
||||
[window->ns.object setResizeIncrements:NSMakeSize(widthincr / xscale, heightincr / yscale)];
|
||||
} else {
|
||||
[window->ns.object setResizeIncrements:NSMakeSize(1.0, 1.0)];
|
||||
}
|
||||
}
|
||||
|
||||
void _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* height)
|
||||
|
||||
Reference in New Issue
Block a user