Skip to content

Commit

Permalink
workspace: Respect minimized state when deserializing workspaces
Browse files Browse the repository at this point in the history
Fixes a regression from #24015 pointed out in #24093
  • Loading branch information
osiewicz committed Feb 3, 2025
1 parent f45d58f commit 84bcdb7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions crates/editor/src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ pub fn init(cx: &mut App) {
app_state,
cx,
|workspace, window, cx| {
cx.activate(true);
Editor::new_file(workspace, &Default::default(), window, cx)
},
)
Expand Down
5 changes: 1 addition & 4 deletions crates/workspace/src/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1284,10 +1284,7 @@ impl Workspace {
.unwrap_or_default();

window
.update(&mut cx, |_, window, cx| {
window.activate_window();
cx.activate(true);
})
.update(&mut cx, |_, window, _| window.activate_window())
.log_err();
Ok((window, opened_items))
})
Expand Down
1 change: 1 addition & 0 deletions crates/zed/src/zed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,7 @@ fn register_actions(
app_state,
cx,
|workspace, window, cx| {
cx.activate(true);
Editor::new_file(workspace, &Default::default(), window, cx)
},
)
Expand Down

0 comments on commit 84bcdb7

Please sign in to comment.