mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 14:46:03 +00:00
Revert 946867b as it breaks window sizing on some compositors
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
Some checks are pending
CI / Linux (python=3.14 cc=clang sanitize=1) (push) Waiting to run
CI / Linux (python=3.12 cc=gcc sanitize=0) (push) Waiting to run
CI / Linux (python=3.13 cc=gcc sanitize=1) (push) Waiting to run
CI / Linux package (push) Waiting to run
CI / Bundle test (macos-latest) (push) Waiting to run
CI / Bundle test (ubuntu-latest) (push) Waiting to run
CI / macOS Brew (push) Waiting to run
CI / Test ./dev.sh and benchmark (push) Waiting to run
CodeQL / CodeQL-Build (actions, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, macos-latest) (push) Waiting to run
CodeQL / CodeQL-Build (c, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (go, ubuntu-latest) (push) Waiting to run
CodeQL / CodeQL-Build (python, ubuntu-latest) (push) Waiting to run
Depscan / Scan dependencies for vulnerabilities (push) Waiting to run
Fixes #10268
This commit is contained in:
parent
ccc2bba92a
commit
0a751263c1
2 changed files with 6 additions and 14 deletions
|
|
@ -179,6 +179,11 @@ consumption to do the same tasks.
|
|||
Detailed list of changes
|
||||
-------------------------------------
|
||||
|
||||
0.48.1 [future]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
- Wayland: fix a regression in the previous release that broke window sizing on Hyprland with fractional scales and an initial specified size (:iss:`10268`)
|
||||
|
||||
0.48.0 [2026-07-18]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
|
|||
15
kitty/glfw.c
15
kitty/glfw.c
|
|
@ -1888,21 +1888,8 @@ create_os_window(PyObject UNUSED *self, PyObject *args, PyObject *kw) {
|
|||
// this can happen if the window is moved by the OS to a different monitor when shown or with fractional scales on Wayland
|
||||
// it can also happen with layer shell windows if the callback is
|
||||
// called before the window is fully created
|
||||
xdpi = n_xdpi; ydpi = n_ydpi; xscale = n_xscale; yscale = n_yscale;
|
||||
xdpi = n_xdpi; ydpi = n_ydpi;
|
||||
fonts_data = load_fonts_data(OPT(font_size), xdpi, ydpi);
|
||||
// Re-compute the window size with the updated scale/font metrics. This matters when
|
||||
// the initial size is specified in cells: the first window on Wayland is created with
|
||||
// scale=1 because fractional scale is only sent by the compositor after the surface
|
||||
// exists, so the cell dimensions used for the initial size calculation were wrong.
|
||||
PyObject *new_size = PyObject_CallFunction(get_window_size, "IIddff", fonts_data->fcm.cell_width, fonts_data->fcm.cell_height, fonts_data->logical_dpi_x, fonts_data->logical_dpi_y, xscale, yscale);
|
||||
if (new_size != NULL) {
|
||||
int new_width = PyLong_AsLong(PyTuple_GET_ITEM(new_size, 0)), new_height = PyLong_AsLong(PyTuple_GET_ITEM(new_size, 1));
|
||||
Py_DECREF(new_size);
|
||||
if (!PyErr_Occurred() && (new_width != width || new_height != height)) {
|
||||
glfwSetWindowSize(glfw_window, new_width, new_height);
|
||||
width = new_width; height = new_height;
|
||||
} else PyErr_Clear();
|
||||
} else PyErr_Clear();
|
||||
}
|
||||
}
|
||||
if (is_first_window) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue