Files
Graphite/desktop/src/window/mac.rs
Timon c4f6a2c9c1 Desktop: Add window abstraction layer (#3302)
* add bundle for mac os and windows

* Fix bundle name

This name gets used as the display name of the app on mac os, shorter name looks better and is more consistent.

* preserve std out by running bin directly

* bundle placeholder on linux

* fix linux

* window abstraction

* fix linux

* fix windows

* fix fmt

* remove windows file that was left

* use self
2025-10-23 11:33:32 +00:00

21 lines
604 B
Rust

use winit::event_loop::ActiveEventLoop;
use winit::window::{Window, WindowAttributes};
use super::NativeWindow;
pub(super) struct NativeWindowImpl {}
impl NativeWindow for NativeWindowImpl {
fn configure(attributes: WindowAttributes, _event_loop: &dyn ActiveEventLoop) -> WindowAttributes {
let mac_window = winit::platform::macos::WindowAttributesMacOS::default()
.with_titlebar_transparent(true)
.with_fullsize_content_view(true)
.with_title_hidden(true);
attributes.with_platform_attributes(Box::new(mac_window))
}
fn new(_window: &dyn Window) -> Self {
NativeWindowImpl {}
}
}