1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-14 03:16:09 +03:00

x11: respect requested x/y geometry if provided

refs: https://github.com/wez/wezterm/issues/1794
This commit is contained in:
Wez Furlong 2022-04-02 07:46:43 -07:00
parent 69288aee4c
commit 89b653acb8

View File

@ -855,6 +855,14 @@ impl XWindow {
};
let width = geometry.width.evaluate_as_pixels(width_context) as usize;
let height = geometry.height.evaluate_as_pixels(height_context) as usize;
let x = geometry
.x
.map(|x| x.evaluate_as_pixels(width_context) as i16)
.unwrap_or(0);
let y = geometry
.y
.map(|y| y.evaluate_as_pixels(height_context) as i16)
.unwrap_or(0);
let window_id;
let window = {
@ -883,8 +891,8 @@ impl XWindow {
window_id,
screen.root(),
// x, y
0,
0,
x,
y,
// width, height
width.try_into()?,
height.try_into()?,