From 0284bcdd3dde76c64bcce42a54413b3651a6497d Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 3 Apr 2022 18:00:27 -0700 Subject: [PATCH] x11: set position only if explicitly requested refs: #1794 --- window/src/os/x11/window.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/window/src/os/x11/window.rs b/window/src/os/x11/window.rs index 5206fd6ed..d2ec25fe9 100644 --- a/window/src/os/x11/window.rs +++ b/window/src/os/x11/window.rs @@ -840,6 +840,7 @@ impl XWindow { })? .x11(); + let needs_reposition = geometry.x.is_some() && geometry.y.is_some(); let ResolvedGeometry { x, y, @@ -964,7 +965,9 @@ impl XWindow { // Some window managers will ignore the x,y that we set during window // creation, so we ask them again once the window is mapped - window_handle.set_window_position(ScreenPoint::new(x.into(), y.into())); + if needs_reposition { + window_handle.set_window_position(ScreenPoint::new(x.into(), y.into())); + } Ok(window_handle) }