Open new windows with a default size and position (#9204)

This PR changes GPUI to open windows with a default size and location,
and to otherwise inherit from their spawning window.

Note: The linux build now crashes on startup.

Release Notes:

- N/A

---------

Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Ezekiel Warren <zaucy@users.noreply.github.com>
This commit is contained in:
Mikayla Maki
2024-03-12 21:19:51 -07:00
committed by GitHub
co-authored by Nathan Ezekiel Warren
parent 9a2dceeea1
commit e792c1a5c5
30 changed files with 443 additions and 347 deletions
+2 -2
View File
@@ -9,7 +9,7 @@ use crate::{
};
use futures::StreamExt;
use gpui::{div, TestAppContext, VisualTestContext, WindowBounds, WindowOptions};
use gpui::{div, TestAppContext, VisualTestContext, WindowOptions};
use indoc::indoc;
use language::{
language_settings::{AllLanguageSettings, AllLanguageSettingsContent, LanguageSettingsContent},
@@ -6873,7 +6873,7 @@ async fn test_following(cx: &mut gpui::TestAppContext) {
let follower = cx.update(|cx| {
cx.open_window(
WindowOptions {
bounds: WindowBounds::Fixed(Bounds::from_corners(
bounds: Some(Bounds::from_corners(
gpui::Point::new(0_f64.into(), 0_f64.into()),
gpui::Point::new(10_f64.into(), 80_f64.into()),
)),
+1
View File
@@ -2664,6 +2664,7 @@ pub mod tests {
cx.executor().run_until_parked();
let editor =
cx.add_window(|cx| Editor::for_multibuffer(multibuffer, Some(project.clone()), cx));
let editor_edited = Arc::new(AtomicBool::new(false));
let fake_server = fake_servers.next().await.unwrap();
let closure_editor_edited = Arc::clone(&editor_edited);