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:
parent
9a2dceeea1
commit
e792c1a5c5
30 changed files with 443 additions and 347 deletions
|
@ -53,8 +53,8 @@ use windows::{
|
|||
use crate::{
|
||||
try_get_window_inner, Action, AnyWindowHandle, BackgroundExecutor, ClipboardItem, CursorStyle,
|
||||
ForegroundExecutor, Keymap, Menu, PathPromptOptions, Platform, PlatformDisplay, PlatformInput,
|
||||
PlatformTextSystem, PlatformWindow, Task, WindowAppearance, WindowOptions, WindowsDispatcher,
|
||||
WindowsDisplay, WindowsTextSystem, WindowsWindow,
|
||||
PlatformTextSystem, PlatformWindow, Task, WindowAppearance, WindowOptions, WindowParams,
|
||||
WindowsDispatcher, WindowsDisplay, WindowsTextSystem, WindowsWindow,
|
||||
};
|
||||
|
||||
pub(crate) struct WindowsPlatform {
|
||||
|
@ -327,15 +327,20 @@ impl Platform for WindowsPlatform {
|
|||
Some(Rc::new(WindowsDisplay::new()))
|
||||
}
|
||||
|
||||
// todo(windows)
|
||||
fn primary_display(&self) -> Option<Rc<dyn PlatformDisplay>> {
|
||||
Some(Rc::new(WindowsDisplay::new()))
|
||||
}
|
||||
|
||||
// todo(windows)
|
||||
fn active_window(&self) -> Option<AnyWindowHandle> {
|
||||
unimplemented!()
|
||||
None
|
||||
}
|
||||
|
||||
fn open_window(
|
||||
&self,
|
||||
handle: AnyWindowHandle,
|
||||
options: WindowOptions,
|
||||
options: WindowParams,
|
||||
) -> Box<dyn PlatformWindow> {
|
||||
Box::new(WindowsWindow::new(self.inner.clone(), handle, options))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue