mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
Avoid calling focus_in
when creating window
This is redundant because when creating a window we will receive an activation event if the window was effectively focused. And if it wasn't, we shouldn't call `focus_in`.
This commit is contained in:
parent
f09e21aa93
commit
bed94455b9
@ -1272,12 +1272,7 @@ impl AppContext {
|
||||
.open_window(window_id, window_options, this.foreground.clone());
|
||||
let window = this.build_window(window_id, platform_window, build_root_view);
|
||||
let root_view = window.root_view().clone().downcast::<V>().unwrap();
|
||||
|
||||
this.windows.insert(window_id, window);
|
||||
this.update_window(window_id, |cx| {
|
||||
root_view.update(cx, |view, cx| view.focus_in(cx.handle().into_any(), cx))
|
||||
});
|
||||
|
||||
(window_id, root_view)
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user