Add the ability to specify a level when creating windows

This lets some windows stay on top of others, independently of
whether the application is in the foreground.
This commit is contained in:
Antonio Scandurra 2022-09-14 17:09:07 +02:00
parent c1f448d8a8
commit 1c9c7ef7ae
4 changed files with 31 additions and 12 deletions

View file

@ -20,7 +20,7 @@ use gpui::{
geometry::vector::vec2f,
impl_actions,
platform::{WindowBounds, WindowOptions},
AssetSource, AsyncAppContext, TitlebarOptions, ViewContext,
AssetSource, AsyncAppContext, TitlebarOptions, ViewContext, WindowLevel,
};
use language::Rope;
pub use lsp;
@ -336,6 +336,7 @@ pub fn build_window_options() -> WindowOptions<'static> {
traffic_light_position: Some(vec2f(8., 8.)),
}),
center: false,
level: WindowLevel::Normal,
}
}