mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 19:10:24 +00:00
Show workspace only after initializing it
This commit is contained in:
parent
5ff49bde31
commit
5a8fb18c20
7 changed files with 10 additions and 2 deletions
|
@ -42,6 +42,7 @@ pub fn init(app_state: &Arc<AppState>, cx: &mut AppContext) {
|
|||
titlebar: None,
|
||||
center: false,
|
||||
focus: false,
|
||||
show: true,
|
||||
kind: WindowKind::PopUp,
|
||||
is_movable: false,
|
||||
screen: Some(screen),
|
||||
|
|
|
@ -36,6 +36,7 @@ pub fn init(app_state: &Arc<AppState>, cx: &mut AppContext) {
|
|||
titlebar: None,
|
||||
center: false,
|
||||
focus: false,
|
||||
show: true,
|
||||
kind: WindowKind::PopUp,
|
||||
is_movable: false,
|
||||
screen: Some(screen),
|
||||
|
|
|
@ -74,6 +74,7 @@ fn create_copilot_auth_window(
|
|||
titlebar: None,
|
||||
center: true,
|
||||
focus: true,
|
||||
show: true,
|
||||
kind: WindowKind::Normal,
|
||||
is_movable: true,
|
||||
screen: None,
|
||||
|
|
|
@ -173,6 +173,7 @@ pub struct WindowOptions<'a> {
|
|||
pub titlebar: Option<TitlebarOptions<'a>>,
|
||||
pub center: bool,
|
||||
pub focus: bool,
|
||||
pub show: bool,
|
||||
pub kind: WindowKind,
|
||||
pub is_movable: bool,
|
||||
pub screen: Option<Rc<dyn Screen>>,
|
||||
|
@ -376,6 +377,7 @@ impl<'a> Default for WindowOptions<'a> {
|
|||
}),
|
||||
center: false,
|
||||
focus: true,
|
||||
show: true,
|
||||
kind: WindowKind::Normal,
|
||||
is_movable: true,
|
||||
screen: None,
|
||||
|
|
|
@ -614,7 +614,7 @@ impl Window {
|
|||
}
|
||||
if options.focus {
|
||||
native_window.makeKeyAndOrderFront_(nil);
|
||||
} else {
|
||||
} else if options.show {
|
||||
native_window.orderFront_(nil);
|
||||
}
|
||||
|
||||
|
|
|
@ -805,6 +805,8 @@ impl Workspace {
|
|||
.await
|
||||
.log_err();
|
||||
|
||||
cx.update_window(workspace.window_id(), |cx| cx.activate_window());
|
||||
|
||||
let workspace = workspace.downgrade();
|
||||
notify_if_database_failed(&workspace, &mut cx);
|
||||
|
||||
|
|
|
@ -398,7 +398,8 @@ pub fn build_window_options(
|
|||
traffic_light_position: Some(vec2f(8., 8.)),
|
||||
}),
|
||||
center: false,
|
||||
focus: true,
|
||||
focus: false,
|
||||
show: false,
|
||||
kind: WindowKind::Normal,
|
||||
is_movable: true,
|
||||
bounds,
|
||||
|
|
Loading…
Reference in a new issue