Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

gpui(windows): Don't log incorrect errors on `SetActiveWindow` calls (#45493)

Lukas Wirth0884305e43e6
diff --git a/crates/gpui/src/platform/windows/events.rs b/crates/gpui/src/platform/windows/events.rs
index 1f0a4a0d28c..8d44ba274ea 100644
--- a/crates/gpui/src/platform/windows/events.rs
+++ b/crates/gpui/src/platform/windows/events.rs
@@ -42,7 +42,7 @@ impl WindowsWindowInner {
let handled = match msg {
// eagerly activate the window, so calls to `active_window` will work correctly
WM_MOUSEACTIVATE => {
- unsafe { SetActiveWindow(handle).log_err() };
+ unsafe { SetActiveWindow(handle).ok() };
None
}
WM_ACTIVATE => self.handle_activate_msg(wparam),
diff --git a/crates/gpui/src/platform/windows/window.rs b/crates/gpui/src/platform/windows/window.rs
index 3fcc29ad786..fa804e3d160 100644
--- a/crates/gpui/src/platform/windows/window.rs
+++ b/crates/gpui/src/platform/windows/window.rs
@@ -740,8 +740,8 @@ impl PlatformWindow for WindowsWindow {
ShowWindowAsync(hwnd, SW_RESTORE).ok().log_err();
}
- SetActiveWindow(hwnd).log_err();
- SetFocus(Some(hwnd)).log_err();
+ SetActiveWindow(hwnd).ok();
+ SetFocus(Some(hwnd)).ok();
}
// premium ragebait by windows, this is needed because the window