diff --git a/config/Cargo.toml b/config/Cargo.toml index 055460dfe..740ef8a97 100644 --- a/config/Cargo.toml +++ b/config/Cargo.toml @@ -28,3 +28,6 @@ termwiz = { path = "../termwiz" } toml = "0.5" wezterm-term = { path = "../term", features=["use_serde"] } mlua = {version="0.2", features=["vendored"]} + +[target."cfg(windows)".dependencies] +winapi = { version = "0.3", features = ["winuser"]} diff --git a/window/src/os/windows/window.rs b/window/src/os/windows/window.rs index 2374982c3..05edf4dbd 100644 --- a/window/src/os/windows/window.rs +++ b/window/src/os/windows/window.rs @@ -263,7 +263,7 @@ fn schedule_show_window(hwnd: HWindow, show: bool) { unsafe { ShowWindow(hwnd.0, if show { SW_NORMAL } else { SW_HIDE }); } - }); + }).detach(); } impl WindowOpsMut for WindowInner { @@ -273,7 +273,7 @@ impl WindowOpsMut for WindowInner { unsafe { DestroyWindow(hwnd.0); } - }); + }).detach(); } fn show(&mut self) { @@ -309,7 +309,7 @@ impl WindowOpsMut for WindowInner { SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER, ); } - }); + }).detach(); } fn set_window_position(&self, coords: ScreenPoint) {