diff --git a/docs/changelog.rst b/docs/changelog.rst index 40071c6e3..38a181c64 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -90,6 +90,9 @@ To update |kitty|, :doc:`follow the instructions `. - macOS: Fix :opt:`resize_in_steps` not working correctly on high DPI screens (:iss:`4114`) +- Fix the :program:`resize OS Windows ` setting a + slightly incorrect size on high DPI screens (:iss:`4114`) + 0.23.1 [2021-08-17] ---------------------- diff --git a/kitty/utils.py b/kitty/utils.py index 3713017ba..caa047ede 100644 --- a/kitty/utils.py +++ b/kitty/utils.py @@ -715,11 +715,11 @@ def get_new_os_window_size( if unit == 'cells': cw = metrics['cell_width'] ch = metrics['cell_height'] - if has_window_scaling: - cw = int(cw / metrics['xscale']) - ch = int(ch / metrics['yscale']) width *= cw height *= ch + if has_window_scaling: + width = round(width / metrics['xscale']) + height = round(height / metrics['yscale']) if incremental: w = metrics['width'] + width h = metrics['height'] + height