Description
In hyprland, with a 4k monitor and a 2x scaling factor, if I launch kitty such that the logical pixel size of the window is not a factor of 2, the initial window launch is fine. Hyprland and wlroots will properly scale everything by a factor of 2. But kitty will store the desired window size without that scaling factor. Resulting in a cached windows size like:
-> cat ~/.cache/kitty/main.json
{"window-size": [859, 517]}
When kitty is launched the next time after this, it will attempt to set this size and wlroots will error, because this is not a factor of the scaling that is set.
The error will look like:
wl_surface@22: error 2: Buffer size (859x517) is not divisible by scale (2)
Ideally, when operating under wayland, kitty should store the window-size with the appropriate scaling. I realize that the wayland ecosystem is young and may not yet provide the right API for this yet. But I still think it's worth knowing about and knowing the solution. This is related to #4878 but is not quite the same thing, as that one is due to cursor sizes and this one is not.