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
parent 9a2dceeea1
commit e792c1a5c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 443 additions and 347 deletions

View file

@ -39,11 +39,12 @@ use crate::platform::linux::client::Client;
use crate::platform::linux::wayland::cursor::Cursor;
use crate::platform::linux::wayland::window::{WaylandDecorationState, WaylandWindow};
use crate::platform::{LinuxPlatformInner, PlatformWindow};
use crate::WindowParams;
use crate::{
platform::linux::wayland::window::WaylandWindowState, AnyWindowHandle, CursorStyle, DisplayId,
KeyDownEvent, KeyUpEvent, Keystroke, Modifiers, ModifiersChangedEvent, MouseButton,
MouseDownEvent, MouseMoveEvent, MouseUpEvent, NavigationDirection, Pixels, PlatformDisplay,
PlatformInput, Point, ScrollDelta, ScrollWheelEvent, TouchPhase, WindowOptions,
PlatformInput, Point, ScrollDelta, ScrollWheelEvent, TouchPhase,
};
/// Used to convert evdev scancode to xkb scancode
@ -207,10 +208,14 @@ impl Client for WaylandClient {
unimplemented!()
}
fn primary_display(&self) -> Option<Rc<dyn PlatformDisplay>> {
None
}
fn open_window(
&self,
handle: AnyWindowHandle,
options: WindowOptions,
options: WindowParams,
) -> Box<dyn PlatformWindow> {
let mut state = self.state.client_state_inner.borrow_mut();