From 3496aff490a0913061dc45c994df9b208fa260ff Mon Sep 17 00:00:00 2001 From: Timmy Xiao <34635512+tzx@users.noreply.github.com> Date: Sun, 7 Jan 2024 16:31:37 -0500 Subject: [PATCH] Need to look into window frames --- window/src/os/wayland/window.rs | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/window/src/os/wayland/window.rs b/window/src/os/wayland/window.rs index a6873ee40..75aeda4b1 100644 --- a/window/src/os/wayland/window.rs +++ b/window/src/os/wayland/window.rs @@ -157,16 +157,6 @@ impl WaylandWindow { .events .assign_window(window_handle.clone()); - // window.set_decorate(if decorations == WindowDecorations::NONE { - // Decorations::None - // } else if decorations == WindowDecorations::default() { - // Decorations::FollowServer - // } else { - // // SCTK/Wayland don't allow more nuance than "decorations are hidden", - // // so if we have a mixture of things, then we need to force our - // // client side decoration rendering. - // Decorations::ClientSide - // }); conn.windows.borrow_mut().insert(window_id, inner.clone()); wait_configure.recv().await?; @@ -323,7 +313,6 @@ pub struct WaylandWindowInner { impl WaylandWindowInner { fn show(&mut self) { - // TODO: Need to implement show log::trace!("WaylandWindowInner show: {:?}", self.window); if self.window.is_none() { return; @@ -332,6 +321,13 @@ impl WaylandWindowInner { self.do_paint().unwrap(); } + fn refresh_frame(&mut self) { + if let Some(window) = self.window.as_mut() { + // window.refresh(); + // window.surface().commit(); + } + } + fn enable_opengl(&mut self) -> anyhow::Result> { let wayland_conn = Connection::get().unwrap().wayland(); let mut wegl_surface = None; @@ -514,7 +510,7 @@ impl WaylandWindowInner { self.invalidated = true; return; } - // TODO: self.do_paint().unwrap(); + self.do_paint().unwrap(); } fn set_title(&mut self, title: String) {