1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-27 02:25:28 +03:00

lua: screens: fixup x11 build

This commit is contained in:
Wez Furlong 2022-07-06 13:30:40 -07:00
parent 99f6fbda15
commit 2b3e5119a4

View File

@ -945,7 +945,6 @@ impl XWindow {
})? })?
.x11(); .x11();
let needs_reposition = geometry.x.is_some() && geometry.y.is_some();
let ResolvedGeometry { let ResolvedGeometry {
x, x,
y, y,
@ -978,8 +977,8 @@ impl XWindow {
depth: conn.depth, depth: conn.depth,
wid: window_id, wid: window_id,
parent: screen.root(), parent: screen.root(),
x: x.try_into()?, x: x.unwrap_or(0).try_into()?,
y: y.try_into()?, y: y.unwrap_or(0).try_into()?,
width: width.try_into()?, width: width.try_into()?,
height: height.try_into()?, height: height.try_into()?,
border_width: 0, border_width: 0,
@ -1084,7 +1083,7 @@ impl XWindow {
// Some window managers will ignore the x,y that we set during window // Some window managers will ignore the x,y that we set during window
// creation, so we ask them again once the window is mapped // creation, so we ask them again once the window is mapped
if needs_reposition { if let (Some(x), Some(y)) = (x, y) {
window_handle.set_window_position(ScreenPoint::new(x.try_into()?, y.try_into()?)); window_handle.set_window_position(ScreenPoint::new(x.try_into()?, y.try_into()?));
} }