mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-22 00:08:04 +02:00
db14d7c220a7d1d40a8a03cce2659fa4f2c51de2
The first OS window on Wayland is created at scale 1 because the compositor only sends the fractional scale after the surface exists. The initial size in cells is therefore computed with scale-1 cell metrics and the window is mapped a few cells too small. The existing post-map recompute calls glfwSetWindowSize(), but on Wayland that loses to the compositor's authoritative configure, which re-asserts the size it recorded at map time. So a window that receives focus (the normal interactive case) stays too small; a background window that never gets an activated configure happens to keep the resized value, which is why it can look fixed. Correct the size while the window is still unmapped instead. GLFW gains a hook (glfwWaylandSetInitialWindowSizeCallback) that it invokes when the fractional scale is applied during creation -- mutter, kwin and niri send the scale before the first configure -- letting the embedder recompute the cell-based logical size for the real scale before the window is mapped. The compositor then records the correct size and its activation configure agrees, so there is nothing to race. The existing post-map recompute is kept as a fallback for compositors that only send the scale after the first configure (sway, Hyprland). Also add glfwCocoaSetWindowLevel to the glfw.py wrapper generator list: it was present in the committed glfw-wrapper but missing from the generator, so regenerating the wrapper (required to add the hook above) would otherwise drop it and break the macOS build.
…
…
…
…
…
…
…
…
…
= kitty - the fast, feature-rich, cross-platform, GPU based terminal If you live in the terminal, *kitty* is made for **you**! See https://sw.kovidgoyal.net/kitty/[the kitty website]. image:https://github.com/kovidgoyal/kitty/workflows/CI/badge.svg["Build status", link="https://github.com/kovidgoyal/kitty/actions?query=workflow%3ACI"] https://sw.kovidgoyal.net/kitty/faq/[Frequently Asked Questions] To ask other questions about kitty usage, use either the https://github.com/kovidgoyal/kitty/discussions/[discussions on GitHub] or the https://www.reddit.com/r/KittyTerminal[Reddit community] Packaging status in various repositories: image:https://repology.org/badge/vertical-allrepos/kitty-terminal.svg?columns=3&header=kitty["Packaging status", link="https://repology.org/project/kitty-terminal/versions"]
Languages
Python
38.6%
C
28%
Go
26.3%
Objective-C
5.5%
Shell
1%
Other
0.5%