diff --git a/src/nodes/drawable/lines.rs b/src/nodes/drawable/lines.rs index 700c4b9..f4b0a29 100644 --- a/src/nodes/drawable/lines.rs +++ b/src/nodes/drawable/lines.rs @@ -227,7 +227,7 @@ fn build_line_mesh( perceptual_roughness: 1.0, // TODO: this should be Blend alpha_mode: AlphaMode::Opaque, - emissive: Color::srgba_u8(128/4, 128/4, 128/4, 255).into(), + emissive: Color::srgba_u8(128 / 4, 128 / 4, 128 / 4, 255).into(), ..default() }, extension: LineExtension { unused: 0 }, diff --git a/src/nodes/spatial/mod.rs b/src/nodes/spatial/mod.rs index ededbbc..0352ed0 100644 --- a/src/nodes/spatial/mod.rs +++ b/src/nodes/spatial/mod.rs @@ -87,13 +87,7 @@ fn despawn_unneeded_spatial_nodes(query: Query<(Entity, &SpatialNode)>, cmds: Pa }); } -fn update_spatial_nodes( - mut query: Query<( - &mut BevyTransform, - &SpatialNode, - &mut Visibility, - )>, -) { +fn update_spatial_nodes(mut query: Query<(&mut BevyTransform, &SpatialNode, &mut Visibility)>) { query .par_iter_mut() .for_each(|(mut transform, spatial_node, mut vis)| { diff --git a/src/wayland/mod.rs b/src/wayland/mod.rs index 5608568..1147ad6 100644 --- a/src/wayland/mod.rs +++ b/src/wayland/mod.rs @@ -5,8 +5,8 @@ mod mesa_drm; mod presentation; mod registry; mod util; -mod vulkano_data; mod viewporter; +mod vulkano_data; mod xdg; use crate::core::registry::OwnedRegistry; diff --git a/src/wayland/viewporter.rs b/src/wayland/viewporter.rs index 9ba051f..8974cf6 100644 --- a/src/wayland/viewporter.rs +++ b/src/wayland/viewporter.rs @@ -1,6 +1,6 @@ use waynest::{ - server::{Client, Dispatcher, Result}, - wire::{ObjectId, Fixed}, + server::{Client, Dispatcher, Result}, + wire::{Fixed, ObjectId}, }; pub use waynest::server::protocol::stable::viewporter::wp_viewport::*; @@ -12,59 +12,59 @@ pub use waynest::server::protocol::stable::viewporter::wp_viewporter::*; pub struct Viewporter; impl WpViewporter for Viewporter { - async fn destroy(&self, _client: &mut Client, _sender_id: ObjectId) -> Result<()> { - Ok(()) - } + async fn destroy(&self, _client: &mut Client, _sender_id: ObjectId) -> Result<()> { + Ok(()) + } - async fn get_viewport( - &self, - client: &mut Client, - _sender_id: ObjectId, - id: ObjectId, - surface_id: ObjectId, - ) -> Result<()> { - let viewport = Viewport::new(id, surface_id); - client.insert(id, viewport); - Ok(()) - } + async fn get_viewport( + &self, + client: &mut Client, + _sender_id: ObjectId, + id: ObjectId, + surface_id: ObjectId, + ) -> Result<()> { + let viewport = Viewport::new(id, surface_id); + client.insert(id, viewport); + Ok(()) + } } #[derive(Debug, Dispatcher)] pub struct Viewport { - id: ObjectId, - surface_id: ObjectId, + id: ObjectId, + surface_id: ObjectId, } impl Viewport { - pub fn new(id: ObjectId, surface_id: ObjectId) -> Self { - Self { id, surface_id } - } + pub fn new(id: ObjectId, surface_id: ObjectId) -> Self { + Self { id, surface_id } + } } impl WpViewport for Viewport { - async fn destroy(&self, _client: &mut Client, _sender_id: ObjectId) -> Result<()> { - Ok(()) - } - - async fn set_source( - &self, - _client: &mut Client, - _sender_id: ObjectId, - _x: Fixed, - _y: Fixed, - _width: Fixed, - _height: Fixed, - ) -> Result<()> { - Ok(()) - } - - async fn set_destination( - &self, - _client: &mut Client, - _sender_id: ObjectId, - _width: i32, - _height: i32, - ) -> Result<()> { - Ok(()) - } -} \ No newline at end of file + async fn destroy(&self, _client: &mut Client, _sender_id: ObjectId) -> Result<()> { + Ok(()) + } + + async fn set_source( + &self, + _client: &mut Client, + _sender_id: ObjectId, + _x: Fixed, + _y: Fixed, + _width: Fixed, + _height: Fixed, + ) -> Result<()> { + Ok(()) + } + + async fn set_destination( + &self, + _client: &mut Client, + _sender_id: ObjectId, + _width: i32, + _height: i32, + ) -> Result<()> { + Ok(()) + } +}