Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Wayland (and hidpi?), initial_window_width/height cell counts are doubled #3834

Closed
egnor opened this issue Jul 16, 2021 · 1 comment
Closed
Labels

Comments

@egnor
Copy link
Contributor

egnor commented Jul 16, 2021

Describe the bug
When setting initial_window_width and initial_window_height in kitty.conf in units of cells (e.g. 80c and 25c), and the display is Wayland, the values are doubled -- 80c/25c results in a 160x50 character window.

Using X11, the doubling does not happen.

To Reproduce
Steps to reproduce the behavior:

  1. Edit kitty.conf to set initial_window_width 80c (and remember_window_size no)
  2. Ensure using Wayland for display (linux_display_server wayland)
  3. Start a new kitty window
  4. For me, the window is 160chars wide (very wide!) rather than 80.

My screen is also hidpi, which might be contributing to the situation?

Screenshots
image

Environment details

kitty 0.21.2 (90164dfee7) created by Kovid Goyal
Linux ostrich 5.11.0-22-generic #23-Ubuntu SMP Thu Jun 17 00:34:23 UTC 2021 x86_64
Ubuntu 21.04 \n \l
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=21.04
DISTRIB_CODENAME=hirsute
DISTRIB_DESCRIPTION="Ubuntu 21.04"
Running under:Wayland
Loaded config files:
  /home/egnor/.config/kitty/kitty.conf

Config options different from defaults:
background            Color(red=64, green=0, blue=80)
background_opacity    0.85
font_size             8.0
initial_window_height (25, 'cells')
initial_window_width  (80, 'cells')
remember_window_size  False

This debug output has been copied to the clipboard

Additional context
Minimal kitty.conf:

remember_window_size false
initial_window_width 80c
linux_display_server wayland
@egnor egnor added the bug label Jul 16, 2021
@kovidgoyal
Copy link
Owner

yes, its a DPI issue. The problem on wayland is, IIRC, there is no good
way to know what the DPI of a window will be before creating it,
therefore initial window sizes dont work very well. It might be possible
to work around, but it would require some spelunking...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants