Merge pull request #1846 from zed-industries/dont-focus-notification-windows

Don't focus incoming call and project shared notification windows
This commit is contained in:
Antonio Scandurra
2022-11-02 13:21:18 +00:00
committed by GitHub
5 changed files with 10 additions and 1 deletions
@@ -41,6 +41,7 @@ pub fn init(cx: &mut MutableAppContext) {
)),
titlebar: None,
center: false,
focus: false,
kind: WindowKind::PopUp,
is_movable: false,
screen: Some(screen),
@@ -40,6 +40,7 @@ pub fn init(cx: &mut MutableAppContext) {
)),
titlebar: None,
center: false,
focus: false,
kind: WindowKind::PopUp,
is_movable: false,
screen: Some(screen),
+2
View File
@@ -152,6 +152,7 @@ pub struct WindowOptions<'a> {
pub bounds: WindowBounds,
pub titlebar: Option<TitlebarOptions<'a>>,
pub center: bool,
pub focus: bool,
pub kind: WindowKind,
pub is_movable: bool,
pub screen: Option<Rc<dyn Screen>>,
@@ -296,6 +297,7 @@ impl<'a> Default for WindowOptions<'a> {
traffic_light_position: Default::default(),
}),
center: false,
focus: true,
kind: WindowKind::Normal,
is_movable: true,
screen: None,
+5 -1
View File
@@ -514,7 +514,11 @@ impl Window {
);
}
}
native_window.makeKeyAndOrderFront_(nil);
if options.focus {
native_window.makeKeyAndOrderFront_(nil);
} else {
native_window.orderFront_(nil);
}
window.0.borrow().move_traffic_light();
pool.drain();
+1
View File
@@ -354,6 +354,7 @@ pub fn build_window_options() -> WindowOptions<'static> {
traffic_light_position: Some(vec2f(8., 8.)),
}),
center: false,
focus: true,
kind: WindowKind::Normal,
is_movable: true,
screen: None,