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.

Checkpoint

Antonio Scandurra8890636a56f0
diff --git a/crates/gpui3/src/app.rs b/crates/gpui3/src/app.rs
index 663995e8935..f2033514fa8 100644
--- a/crates/gpui3/src/app.rs
+++ b/crates/gpui3/src/app.rs
@@ -270,9 +270,11 @@ impl AppContext {
.take()
.unwrap()
.and_then(|id| FocusHandle::for_id(id, &cx.window.focus_handles));
- let event = FocusEvent { focused, blurred };
- for listener in &listeners {
- listener(&event, cx);
+ if focused.is_some() || blurred.is_some() {
+ let event = FocusEvent { focused, blurred };
+ for listener in &listeners {
+ listener(&event, cx);
+ }
}
listeners.extend(cx.window.focus_listeners.drain(..));