refactor: minor clippy warns
parent
0aea66005f
commit
3f499429d7
|
@ -83,6 +83,7 @@ impl WindowingSystemBuilder {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::missing_errors_doc)]
|
||||||
pub fn build(&mut self) -> Result<WindowingSystem> {
|
pub fn build(&mut self) -> Result<WindowingSystem> {
|
||||||
match self.config.component_definition {
|
match self.config.component_definition {
|
||||||
Some(_) => WindowingSystem::new(&mut self.config),
|
Some(_) => WindowingSystem::new(&mut self.config),
|
||||||
|
|
|
@ -51,7 +51,7 @@ impl WindowingSystem {
|
||||||
&layer_shell,
|
&layer_shell,
|
||||||
&event_queue.handle(),
|
&event_queue.handle(),
|
||||||
config,
|
config,
|
||||||
)?;
|
);
|
||||||
|
|
||||||
let pointer = Rc::new(seat.get_pointer(&event_queue.handle(), ()));
|
let pointer = Rc::new(seat.get_pointer(&event_queue.handle(), ()));
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ impl WindowingSystem {
|
||||||
layer_shell: &ZwlrLayerShellV1,
|
layer_shell: &ZwlrLayerShellV1,
|
||||||
queue_handle: &QueueHandle<WindowState>,
|
queue_handle: &QueueHandle<WindowState>,
|
||||||
config: &config::WindowConfig,
|
config: &config::WindowConfig,
|
||||||
) -> Result<(Rc<WlSurface>, Rc<ZwlrLayerSurfaceV1>)> {
|
) -> (Rc<WlSurface>, Rc<ZwlrLayerSurfaceV1>) {
|
||||||
let surface = Rc::new(compositor.create_surface(queue_handle, ()));
|
let surface = Rc::new(compositor.create_surface(queue_handle, ()));
|
||||||
let layer_surface = Rc::new(layer_shell.get_layer_surface(
|
let layer_surface = Rc::new(layer_shell.get_layer_surface(
|
||||||
&surface,
|
&surface,
|
||||||
|
@ -117,7 +117,7 @@ impl WindowingSystem {
|
||||||
|
|
||||||
Self::configure_layer_surface(&layer_surface, &surface, config);
|
Self::configure_layer_surface(&layer_surface, &surface, config);
|
||||||
|
|
||||||
Ok((surface, layer_surface))
|
(surface, layer_surface)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn configure_layer_surface(
|
fn configure_layer_surface(
|
||||||
|
|
|
@ -23,7 +23,7 @@ pub struct WindowStateBuilder {
|
||||||
|
|
||||||
impl WindowStateBuilder {
|
impl WindowStateBuilder {
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Default::default()
|
Self::default()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn surface(mut self, surface: Rc<WlSurface>) -> Self {
|
pub fn surface(mut self, surface: Rc<WlSurface>) -> Self {
|
||||||
|
|
|
@ -63,6 +63,7 @@ impl WindowState {
|
||||||
self.size = new_size;
|
self.size = new_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::cast_possible_truncation)]
|
||||||
pub fn set_current_pointer_position(&mut self, physical_x: f64, physical_y: f64) {
|
pub fn set_current_pointer_position(&mut self, physical_x: f64, physical_y: f64) {
|
||||||
let scale_factor = self.scale_factor;
|
let scale_factor = self.scale_factor;
|
||||||
let logical_position = LogicalPosition::new(
|
let logical_position = LogicalPosition::new(
|
||||||
|
|
Loading…
Reference in New Issue