diff --git a/crates/vent-window/src/lib.rs b/crates/vent-window/src/lib.rs index a8e4a94..e3dc523 100644 --- a/crates/vent-window/src/lib.rs +++ b/crates/vent-window/src/lib.rs @@ -43,6 +43,7 @@ pub struct WindowAttribs { mode: WindowMode, min_size: Option<(u32, u32)>, max_size: Option<(u32, u32)>, + resizable: bool, } impl WindowAttribs { @@ -66,6 +67,7 @@ impl Default for WindowAttribs { mode: WindowMode::Default, max_size: None, min_size: None, + resizable: false, } } } diff --git a/crates/vent-window/src/platform/wayland/mod.rs b/crates/vent-window/src/platform/wayland/mod.rs index 1617d5d..de88425 100644 --- a/crates/vent-window/src/platform/wayland/mod.rs +++ b/crates/vent-window/src/platform/wayland/mod.rs @@ -116,7 +116,12 @@ impl WaylandWindow { let window = &self.window; let attribs = &self.attribs; window.set_title(attribs.title.clone()); - // TODO WindowMode + match attribs.mode { + crate::WindowMode::Default => {} + crate::WindowMode::FullScreen => window.set_fullscreen(None), + crate::WindowMode::Maximized => window.set_maximized(), + crate::WindowMode::Minimized => window.set_minimized(), + } window.set_app_id(attribs.app_id.clone()); window.set_max_size(attribs.max_size); window.set_min_size(attribs.min_size); @@ -145,7 +150,9 @@ impl WaylandWindow { ResizeEdge::BottomRight => XdgResizeEdge::BottomRight, _ => return, }; - self.window.resize(seat, serial, edge); + if self.attribs.resizable { + self.window.resize(seat, serial, edge); + } } FrameAction::Move => self.window.move_(seat, serial), _ => (), diff --git a/test/runtime-sandbox/src/main.rs b/test/runtime-sandbox/src/main.rs index 94d830d..58482c9 100644 --- a/test/runtime-sandbox/src/main.rs +++ b/test/runtime-sandbox/src/main.rs @@ -1,14 +1,5 @@ -use vent_common::project::VentApplicationProject; use vent_runtime::VentApplication; fn main() { - let project = VentApplicationProject { - name: env!("CARGO_PKG_NAME").to_string(), - version: env!("CARGO_PKG_VERSION").to_string(), - }; - - project - .deserialize(env!("CARGO_MANIFEST_DIR")) - .expect("Failed to write Vent Project"); VentApplication::default(); }