Wayland: Fix initial_window_size in cells on scale != 1 screens
Fixes #3834
This commit is contained in:
parent
3b585e6dbb
commit
070911d458
@ -34,6 +34,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
|||||||
- Add a new variable ``{num_window_groups}`` for the :opt:`tab_title_template`
|
- Add a new variable ``{num_window_groups}`` for the :opt:`tab_title_template`
|
||||||
(:iss:`3837`)
|
(:iss:`3837`)
|
||||||
|
|
||||||
|
- Wayland: Fix :opt:`initial_window_width` specified in cells not working on
|
||||||
|
High DPI screens (:iss:`3834`)
|
||||||
|
|
||||||
|
|
||||||
0.21.2 [2021-06-28]
|
0.21.2 [2021-06-28]
|
||||||
----------------------
|
----------------------
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
from typing import Any, Callable, Dict, NamedTuple, Tuple
|
from typing import Any, Callable, Dict, NamedTuple, Tuple
|
||||||
|
|
||||||
from .constants import is_macos
|
from .constants import is_macos, is_wayland
|
||||||
from .types import FloatEdges
|
from .types import FloatEdges
|
||||||
from .typing import EdgeLiteral
|
from .typing import EdgeLiteral
|
||||||
from .utils import log_error
|
from .utils import log_error
|
||||||
@ -47,9 +47,8 @@ def initial_window_size_func(opts: WindowSizeData, cached_values: Dict) -> Calla
|
|||||||
h, h_unit = opts.initial_window_sizes.height
|
h, h_unit = opts.initial_window_sizes.height
|
||||||
|
|
||||||
def get_window_size(cell_width: int, cell_height: int, dpi_x: float, dpi_y: float, xscale: float, yscale: float) -> Tuple[int, int]:
|
def get_window_size(cell_width: int, cell_height: int, dpi_x: float, dpi_y: float, xscale: float, yscale: float) -> Tuple[int, int]:
|
||||||
if not is_macos:
|
if not is_macos and not is_wayland():
|
||||||
# scaling is not needed on Wayland, but is needed on macOS. Not
|
# Not sure what the deal with scaling on X11 is
|
||||||
# sure about X11.
|
|
||||||
xscale = yscale = 1
|
xscale = yscale = 1
|
||||||
|
|
||||||
def effective_margin(which: EdgeLiteral) -> float:
|
def effective_margin(which: EdgeLiteral) -> float:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user