Show workspace only after initializing it
This commit is contained in:
@@ -42,6 +42,7 @@ pub fn init(app_state: &Arc<AppState>, cx: &mut AppContext) {
|
|||||||
titlebar: None,
|
titlebar: None,
|
||||||
center: false,
|
center: false,
|
||||||
focus: false,
|
focus: false,
|
||||||
|
show: true,
|
||||||
kind: WindowKind::PopUp,
|
kind: WindowKind::PopUp,
|
||||||
is_movable: false,
|
is_movable: false,
|
||||||
screen: Some(screen),
|
screen: Some(screen),
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ pub fn init(app_state: &Arc<AppState>, cx: &mut AppContext) {
|
|||||||
titlebar: None,
|
titlebar: None,
|
||||||
center: false,
|
center: false,
|
||||||
focus: false,
|
focus: false,
|
||||||
|
show: true,
|
||||||
kind: WindowKind::PopUp,
|
kind: WindowKind::PopUp,
|
||||||
is_movable: false,
|
is_movable: false,
|
||||||
screen: Some(screen),
|
screen: Some(screen),
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ fn create_copilot_auth_window(
|
|||||||
titlebar: None,
|
titlebar: None,
|
||||||
center: true,
|
center: true,
|
||||||
focus: true,
|
focus: true,
|
||||||
|
show: true,
|
||||||
kind: WindowKind::Normal,
|
kind: WindowKind::Normal,
|
||||||
is_movable: true,
|
is_movable: true,
|
||||||
screen: None,
|
screen: None,
|
||||||
|
|||||||
@@ -173,6 +173,7 @@ pub struct WindowOptions<'a> {
|
|||||||
pub titlebar: Option<TitlebarOptions<'a>>,
|
pub titlebar: Option<TitlebarOptions<'a>>,
|
||||||
pub center: bool,
|
pub center: bool,
|
||||||
pub focus: bool,
|
pub focus: bool,
|
||||||
|
pub show: bool,
|
||||||
pub kind: WindowKind,
|
pub kind: WindowKind,
|
||||||
pub is_movable: bool,
|
pub is_movable: bool,
|
||||||
pub screen: Option<Rc<dyn Screen>>,
|
pub screen: Option<Rc<dyn Screen>>,
|
||||||
@@ -376,6 +377,7 @@ impl<'a> Default for WindowOptions<'a> {
|
|||||||
}),
|
}),
|
||||||
center: false,
|
center: false,
|
||||||
focus: true,
|
focus: true,
|
||||||
|
show: true,
|
||||||
kind: WindowKind::Normal,
|
kind: WindowKind::Normal,
|
||||||
is_movable: true,
|
is_movable: true,
|
||||||
screen: None,
|
screen: None,
|
||||||
|
|||||||
@@ -614,7 +614,7 @@ impl Window {
|
|||||||
}
|
}
|
||||||
if options.focus {
|
if options.focus {
|
||||||
native_window.makeKeyAndOrderFront_(nil);
|
native_window.makeKeyAndOrderFront_(nil);
|
||||||
} else {
|
} else if options.show {
|
||||||
native_window.orderFront_(nil);
|
native_window.orderFront_(nil);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -805,6 +805,8 @@ impl Workspace {
|
|||||||
.await
|
.await
|
||||||
.log_err();
|
.log_err();
|
||||||
|
|
||||||
|
cx.update_window(workspace.window_id(), |cx| cx.activate_window());
|
||||||
|
|
||||||
let workspace = workspace.downgrade();
|
let workspace = workspace.downgrade();
|
||||||
notify_if_database_failed(&workspace, &mut cx);
|
notify_if_database_failed(&workspace, &mut cx);
|
||||||
|
|
||||||
|
|||||||
@@ -398,7 +398,8 @@ pub fn build_window_options(
|
|||||||
traffic_light_position: Some(vec2f(8., 8.)),
|
traffic_light_position: Some(vec2f(8., 8.)),
|
||||||
}),
|
}),
|
||||||
center: false,
|
center: false,
|
||||||
focus: true,
|
focus: false,
|
||||||
|
show: false,
|
||||||
kind: WindowKind::Normal,
|
kind: WindowKind::Normal,
|
||||||
is_movable: true,
|
is_movable: true,
|
||||||
bounds,
|
bounds,
|
||||||
|
|||||||
Reference in New Issue
Block a user