From decaa33752dbf78c818fa31fa0e9b238b1d21136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20S=C3=A1lyi?= Date: Wed, 23 Apr 2025 15:21:51 +0200 Subject: [PATCH] Format code --- rustfmt.toml | 19 +++ src/compositors.rs | 22 +-- src/compositors/hyprland.rs | 2 +- src/compositors/niri.rs | 2 +- src/compositors/sway.rs | 9 +- src/gpu.rs | 10 +- src/gpu/device.rs | 8 +- src/image.rs | 10 +- src/main.rs | 20 ++- src/signal.rs | 2 +- src/wayland.rs | 261 +++++++++++++----------------------- 11 files changed, 156 insertions(+), 209 deletions(-) create mode 100644 rustfmt.toml diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..e7c3bfa --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,19 @@ +# This project doesn't use rustfmt, these are only for hints with +# rustfmt --check src/file.rs + +doc_comment_code_block_width = 80 +edition = "2021" +format_code_in_doc_comments = true +format_macro_matchers = true +format_strings = true +group_imports = "StdExternalCrate" +imports_granularity = "Crate" +match_arm_blocks = false +match_block_trailing_comma = true +max_width = 80 +reorder_impl_items = true +style_edition = "2021" +trailing_semicolon = false +use_field_init_shorthand = true +use_small_heuristics = "Max" +wrap_comments = true diff --git a/src/compositors.rs b/src/compositors.rs index 3181d45..b2ef2f6 100644 --- a/src/compositors.rs +++ b/src/compositors.rs @@ -33,16 +33,15 @@ impl Compositor { debug!("Selecting compositor Sway based on {xdg_desktop_var}"); Some(Compositor::Sway) } else if xdg_desktop.as_bytes().starts_with(b"Hyprland") { - debug!("Selecting compositor Hyprland based on {xdg_desktop_var}"); + debug!("Selecting compositor Hyprland based on {}", + xdg_desktop_var); Some(Compositor::Hyprland) } else if xdg_desktop.as_bytes().starts_with(b"niri") { debug!("Selecting compositor Niri based on {xdg_desktop_var}"); Some(Compositor::Niri) } else { - warn!( - "Unrecognized compositor from {xdg_desktop_var} \ - environment variable: {xdg_desktop:?}" - ); + warn!("Unrecognized compositor from {xdg_desktop_var} \ + environment variable: {xdg_desktop:?}"); None } } else { @@ -107,7 +106,11 @@ pub struct ConnectionTask { } impl ConnectionTask { - pub fn new(composer: Compositor, tx: Sender, waker: Arc) -> Self { + pub fn new( + composer: Compositor, + tx: Sender, + waker: Arc, + ) -> Self { let interface: Box = match composer { Compositor::Sway => Box::new(sway::SwayConnectionTask::new()), Compositor::Hyprland => Box::new( @@ -135,7 +138,8 @@ impl ConnectionTask { composer_interface.subscribe_event_loop(event_sender); } Compositor::Hyprland => { - let composer_interface = hyprland::HyprlandConnectionTask::new(); + let composer_interface = + hyprland::HyprlandConnectionTask::new(); composer_interface.subscribe_event_loop(event_sender); } Compositor::Niri => { @@ -164,7 +168,9 @@ impl ConnectionTask { } pub fn request_visible_workspaces(&mut self) { - for workspace in self.interface.request_visible_workspaces().into_iter() { + for workspace in self.interface + .request_visible_workspaces().into_iter() + { self.tx .send(WorkspaceVisible { output: workspace.output, diff --git a/src/compositors/hyprland.rs b/src/compositors/hyprland.rs index a5aa4cb..b490c73 100644 --- a/src/compositors/hyprland.rs +++ b/src/compositors/hyprland.rs @@ -10,7 +10,7 @@ use std::{ use log::debug; use serde::Deserialize; -use super::{CompositorInterface, WorkspaceVisible, EventSender}; +use super::{CompositorInterface, EventSender, WorkspaceVisible}; pub struct HyprlandConnectionTask {} diff --git a/src/compositors/niri.rs b/src/compositors/niri.rs index 2e9575b..496fd5e 100644 --- a/src/compositors/niri.rs +++ b/src/compositors/niri.rs @@ -3,7 +3,7 @@ use std::io; use log::debug; use niri_ipc::{socket::Socket, Event, Request, Response, Workspace}; -use super::{CompositorInterface, WorkspaceVisible, EventSender}; +use super::{CompositorInterface, EventSender, WorkspaceVisible}; pub struct NiriConnectionTask {} diff --git a/src/compositors/sway.rs b/src/compositors/sway.rs index 3657105..c5e1ba6 100644 --- a/src/compositors/sway.rs +++ b/src/compositors/sway.rs @@ -1,4 +1,4 @@ -use super::{CompositorInterface, WorkspaceVisible, EventSender}; +use super::{CompositorInterface, EventSender, WorkspaceVisible}; use swayipc::{Connection, Event, EventType, WorkspaceChange}; pub struct SwayConnectionTask { @@ -8,7 +8,9 @@ pub struct SwayConnectionTask { impl SwayConnectionTask { pub fn new() -> Self { SwayConnectionTask { - sway_conn: Connection::new().expect("Failed to connect to sway socket. If you're not using sway, pass the correct --compositor argument. Original cause"), + sway_conn: Connection::new().expect("Failed to connect to sway \ + socket. If you're not using sway, pass the correct \ + --compositor argument. Original cause"), } } } @@ -28,7 +30,8 @@ impl CompositorInterface for SwayConnectionTask { } fn subscribe_event_loop(self, event_sender: EventSender) { - let event_stream = self.sway_conn.subscribe([EventType::Workspace]).unwrap(); + let event_stream = self.sway_conn + .subscribe([EventType::Workspace]).unwrap(); for event_result in event_stream { let event = event_result.unwrap(); let Event::Workspace(workspace_event) = event else { diff --git a/src/gpu.rs b/src/gpu.rs index abc2ecb..ba3df0c 100644 --- a/src/gpu.rs +++ b/src/gpu.rs @@ -16,11 +16,7 @@ use std::{ use anyhow::Context; use ash::{ Device, Entry, Instance, - ext::{ - debug_report, - debug_utils, - image_drm_format_modifier, - }, + ext::{debug_report, debug_utils, image_drm_format_modifier}, khr::external_memory_fd, vk::{ Buffer, @@ -82,7 +78,7 @@ impl Gpu { fn select_device( &mut self, - dmabuf_drm_dev: Option + dmabuf_drm_dev: Option, ) -> Option> { let mut ret = None; self.devices.retain(|weak_gpu_device| { @@ -254,7 +250,7 @@ impl GpuMemory { pub fn dmabuf_feedback_eq( &self, dmabuf_drm_dev: Option, - drm_format_modifiers: &[u64] + drm_format_modifiers: &[u64], ) -> bool { self.gpu_device.dmabuf_drm_dev_eq(dmabuf_drm_dev) && drm_format_modifiers.contains(&self.drm_format_modifier) diff --git a/src/gpu/device.rs b/src/gpu/device.rs index 43479e8..cdb4160 100644 --- a/src/gpu/device.rs +++ b/src/gpu/device.rs @@ -1,5 +1,5 @@ use std::{ - ffi::{CStr, c_char}, + ffi::{c_char, CStr}, rc::Rc, }; @@ -12,11 +12,7 @@ use ash::{ physical_device_drm, queue_family_foreign, }, - khr::{ - driver_properties, - external_memory_fd, - image_format_list, - }, + khr::{driver_properties, external_memory_fd, image_format_list}, vk::{ self, api_version_variant, diff --git a/src/image.rs b/src/image.rs index 6cef2d2..30f75ba 100644 --- a/src/image.rs +++ b/src/image.rs @@ -30,7 +30,7 @@ pub struct WallpaperFile { } pub fn output_wallpaper_files( - output_dir: &Path + output_dir: &Path, ) -> anyhow::Result> { let dir = read_dir(output_dir).context("Failed to read directory")?; let mut ret = Vec::new(); @@ -197,9 +197,8 @@ fn copy_pad_stride( height: usize, ) { for row in 0..height { - dst[row * dst_stride..][..src_stride].copy_from_slice( - &src[row * src_stride..][..src_stride] - ); + dst[row * dst_stride..][..src_stride] + .copy_from_slice(&src[row * src_stride..][..src_stride]); } } @@ -210,8 +209,7 @@ fn swizzle_bgra_from_rgb(src: &[u8], dst: &mut [u8]) { unsafe { #[cfg(target_arch = "x86_64")] if is_x86_feature_detected!("avx2") { - bgra_from_rgb_avx2(src, dst, pixel_count); - return + return bgra_from_rgb_avx2(src, dst, pixel_count) } bgra_from_rgb(src, dst, pixel_count) } diff --git a/src/main.rs b/src/main.rs index 4987d52..38f295f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,5 @@ -mod compositors; mod cli; +mod compositors; mod gpu; mod image; mod poll; @@ -42,8 +42,8 @@ use smithay_client_toolkit::reexports::protocols use crate::{ cli::{Cli, PixelFormat}, compositors::{Compositor, ConnectionTask, WorkspaceVisible}, - image::ColorTransform, gpu::Gpu, + image::ColorTransform, poll::{Poll, Waker}, signal::SignalPipe, wayland::BackgroundLayer, @@ -160,8 +160,7 @@ fn run() -> anyhow::Result<()> { shm_format, background_layers: Vec::new(), compositor_connection_task: ConnectionTask::new( - compositor, - tx.clone(), Arc::clone(&waker) + compositor, tx.clone(), Arc::clone(&waker) ), color_transform, dmabuf_state, @@ -240,7 +239,7 @@ fn flush_blocking(event_queue: &EventQueue) { fn ensure_prepare_read( state: &mut State, - event_queue: &mut EventQueue + event_queue: &mut EventQueue, ) -> ReadEventsGuard { loop { if let Some(guard) = event_queue.prepare_read() { return guard } @@ -263,24 +262,23 @@ fn handle_sway_event( state: &mut State, rx: &Receiver, ) { - while let Ok(workspace) = rx.try_recv() - { + while let Ok(workspace) = rx.try_recv() { // Find the background layer that of the output where the workspace is if let Some(affected_bg_layer) = state.background_layers.iter_mut() .find(|bg_layer| bg_layer.output_name == workspace.output) { affected_bg_layer.draw_workspace_bg(&workspace.workspace_name); - } - else { + } else { error!( - "Workspace '{}' is on an unknown output '{}', known outputs were: {}", + "Workspace '{}' is on an unknown output '{}', \ + known outputs were: {}", workspace.workspace_name, workspace.output, state.background_layers.iter() .map(|bg_layer| bg_layer.output_name.as_str()) .collect::>().join(", ") ); - continue; + continue }; } } diff --git a/src/signal.rs b/src/signal.rs index b6c2d3c..5251d13 100644 --- a/src/signal.rs +++ b/src/signal.rs @@ -135,7 +135,7 @@ unsafe fn sigaction_set_handler( signum: c_int, handler: extern "C" fn(c_int), mask: sigset_t, - flags: c_int + flags: c_int, ) -> io::Result<()> { unsafe { if sigaction( diff --git a/src/wayland.rs b/src/wayland.rs index 25aedbd..338e08b 100644 --- a/src/wayland.rs +++ b/src/wayland.rs @@ -57,8 +57,7 @@ use crate::{ image::{load_wallpaper, output_wallpaper_files, WallpaperFile}, }; -impl CompositorHandler for State -{ +impl CompositorHandler for State { fn scale_factor_changed( &mut self, _conn: &Connection, @@ -218,8 +217,7 @@ impl DmabufHandler for State { } } -impl LayerShellHandler for State -{ +impl LayerShellHandler for State { fn closed( &mut self, _conn: &Connection, @@ -246,19 +244,14 @@ impl LayerShellHandler for State self.compositor_connection_task .request_visible_workspace(&bg_layer.output_name); - debug!( - "Configured layer on output: {}, new surface size {}x{}", + debug!("Configured layer on output: {}, new surface size {}x{}", bg_layer.output_name, - configure.new_size.0, configure.new_size.1 - ); - } - else { - debug!( -"Ignoring configure for already configured layer on output: {}, \ -new surface size {}x{}", + configure.new_size.0, configure.new_size.1); + } else { + debug!("Ignoring configure for already configured layer \ + on output: {}, new surface size {}x{}", bg_layer.output_name, - configure.new_size.0, configure.new_size.1 - ); + configure.new_size.0, configure.new_size.1); } } } @@ -274,35 +267,29 @@ impl OutputHandler for State { qh: &QueueHandle, output: WlOutput, ) { - let Some(info) = self.output_state.info(&output) - else { + let Some(info) = self.output_state.info(&output) else { error!("New output has no output info, skipping"); - return; + return }; - let Some(output_name) = info.name - else { + let Some(output_name) = info.name else { error!("New output has no name, skipping"); - return; + return }; let Some((width, height)) = info.modes.iter() .find(|mode| mode.current) .map(|mode| mode.dimensions) else { - error!( - "New output '{}' has no current mode set, skipping", - output_name - ); - return; + error!("New output {} has no current mode set, skipping", + output_name); + return }; if !width.is_positive() || !height.is_positive() { - error!( - "New output '{}' has non-positive resolution: {} x {}, skipping", - output_name, width, height - ); - return; + error!("New output {} has non-positive resolution: {} x {}, \ + skipping", output_name, width, height); + return } let (width, height) = { @@ -316,10 +303,8 @@ impl OutputHandler for State { | Transform::Flipped90 | Transform::Flipped270 => (height, width), _ => { - warn!( - "New output '{}' has unsupported transform", - output_name - ); + warn!("New output {} has unsupported transform", + output_name); (width, height) } } @@ -327,29 +312,21 @@ impl OutputHandler for State { let integer_scale_factor = info.scale_factor; - let Some((logical_width, logical_height)) = info.logical_size - else { - error!( - "New output '{}' has no logical_size, skipping", - output_name - ); - return; + let Some((logical_width, logical_height)) = info.logical_size else { + error!("New output {} has no logical_size, skipping", output_name); + return }; if !logical_width.is_positive() || !logical_height.is_positive() { - error!( - "New output '{}' has non-positive logical size: {} x {}, skipping", - output_name, logical_width, logical_height - ); - return; + error!("New output {} has non-positive logical size: {} x {}, \ + skipping", output_name, logical_width, logical_height); + return } - debug!( -"New output, name: {}, resolution: {}x{}, integer scale factor: {}, \ -logical size: {}x{}, transform: {:?}", + debug!("New output, name: {}, resolution: {}x{}, integer scale \ + factor: {}, logical size: {}x{}, transform: {:?}", output_name, width, height, integer_scale_factor, - logical_width, logical_height, info.transform - ); + logical_width, logical_height, info.transform); let layer = self.layer_shell.create_layer_surface( qh, @@ -374,7 +351,7 @@ logical size: {}x{}, transform: {:?}", match Region::new(&self.compositor_state) { Ok(region) => surface.set_input_region(Some(region.wl_region())), Err(error) => error!( - "Failed to create empty input region, on new output '{}': {}", + "Failed to create empty input region, on new output {}: {}", output_name, error ) }; @@ -382,16 +359,14 @@ logical size: {}x{}, transform: {:?}", let mut viewport = None; if width == logical_width || height == logical_height { - debug!("Output '{}' needs no scaling", output_name); - } - else if width == logical_width * integer_scale_factor + debug!("Output {} needs no scaling", output_name); + } else if width == logical_width * integer_scale_factor && height == logical_height * integer_scale_factor { - debug!("Output '{}' needs integer scaling", output_name); + debug!("Output {} needs integer scaling", output_name); surface.set_buffer_scale(integer_scale_factor); - } - else { - debug!("Output '{}' needs fractional scaling", output_name); + } else { + debug!("Output {} needs fractional scaling", output_name); let new_viewport = self.viewporter.get_viewport(surface, qh, ()); new_viewport.set_destination(logical_width, logical_height); viewport = Some(new_viewport); @@ -449,12 +424,7 @@ logical size: {}x{}, transform: {:?}", dmabuf_feedback, }); if !is_dmabuf_feedback { - load_wallpapers( - self, - qh, - bg_layer_index, - gpu_uploader, - ); + load_wallpapers(self, qh, bg_layer_index, gpu_uploader); } } @@ -464,35 +434,29 @@ logical size: {}x{}, transform: {:?}", qh: &QueueHandle, output: WlOutput, ) { - let Some(info) = self.output_state.info(&output) - else { + let Some(info) = self.output_state.info(&output) else { error!("Updated output has no output info, skipping"); - return; + return }; - let Some(output_name) = info.name - else { + let Some(output_name) = info.name else { error!("Updated output has no name, skipping"); - return; + return }; let Some((width, height)) = info.modes.iter() .find(|mode| mode.current) .map(|mode| mode.dimensions) else { - error!( - "Updated output '{}' has no current mode set, skipping", - output_name - ); - return; + error!("Updated output {} has no current mode set, skipping", + output_name); + return }; if !width.is_positive() || !height.is_positive() { - error!( - "Updated output '{}' has non-positive resolution: {} x {}, skipping", - output_name, width, height - ); - return; + error!("Updated output {} has non-positive resolution: {} x {}, \ + skipping", output_name, width, height); + return } let (width, height) = { @@ -506,10 +470,8 @@ logical size: {}x{}, transform: {:?}", | Transform::Flipped90 | Transform::Flipped270 => (height, width), _ => { - warn!( - "Updated output '{}' has unsupported transform", - output_name - ); + warn!("Updated output {} has unsupported transform", + output_name); (width, height) } } @@ -517,67 +479,55 @@ logical size: {}x{}, transform: {:?}", let integer_scale_factor = info.scale_factor; - let Some((logical_width, logical_height)) = info.logical_size - else { - error!( - "Updated output '{}' has no logical_size, skipping", - output_name - ); - return; + let Some((logical_width, logical_height)) = info.logical_size else { + error!("Updated output {} has no logical_size, skipping", + output_name); + return }; if !logical_width.is_positive() || !logical_height.is_positive() { - error!( - "Updated output '{}' has non-positive logical size: {} x {}, skipping", - output_name, logical_width, logical_height - ); - return; + error!("Updated output {} has non-positive logical size: {} x {}, \ + skipping", output_name, logical_width, logical_height); + return } - debug!( -"Updated output, name: {}, resolution: {}x{}, integer scale factor: {}, \ -logical size: {}x{}, transform: {:?}", + debug!("Updated output, name: {}, resolution: {}x{}, integer scale \ + factor: {}, logical size: {}x{}, transform: {:?}", output_name, width, height, integer_scale_factor, - logical_width, logical_height, info.transform - ); + logical_width, logical_height, info.transform); let Some(bg_layer) = self.background_layers.iter_mut() .find(|bg_layers| bg_layers.output_name == output_name) else { - error!( - "Updated output '{}' has no background layer, skipping", - output_name - ); - return; + error!("Updated output {} has no background layer, skipping", + output_name); + return }; if bg_layer.width != width || bg_layer.height != height { - warn!( -"Handling of output mode or transform changes are not yet implemented. \ -Restart multibg-sway or expect broken wallpapers or low quality due to scaling" - ); + warn!("Handling of output mode or transform changes are not yet \ + implemented. Restart multibg-sway or expect broken wallpapers \ + or low quality due to scaling"); } let surface = bg_layer.layer.wl_surface(); if width == logical_width || height == logical_height { - debug!("Output '{}' needs no scaling", output_name); + debug!("Output {} needs no scaling", output_name); surface.set_buffer_scale(1); if let Some(old_viewport) = bg_layer.viewport.take() { old_viewport.destroy(); }; - } - else if width == logical_width * integer_scale_factor + } else if width == logical_width * integer_scale_factor && height == logical_height * integer_scale_factor { - debug!("Output '{}' needs integer scaling", output_name); + debug!("Output {} needs integer scaling", output_name); surface.set_buffer_scale(integer_scale_factor); if let Some(old_viewport) = bg_layer.viewport.take() { old_viewport.destroy(); }; - } - else { - debug!("Output '{}' needs fractional scaling", output_name); + } else { + debug!("Output {} needs fractional scaling", output_name); surface.set_buffer_scale(1); bg_layer.viewport .get_or_insert_with(|| @@ -595,22 +545,17 @@ Restart multibg-sway or expect broken wallpapers or low quality due to scaling" _qh: &QueueHandle, output: WlOutput, ) { - let Some(info) = self.output_state.info(&output) - else { + let Some(info) = self.output_state.info(&output) else { error!("Destroyed output has no output info, skipping"); - return; + return }; - let Some(output_name) = info.name - else { + let Some(output_name) = info.name else { error!("Destroyed output has no name, skipping"); - return; + return }; - debug!( - "Output destroyed: {}", - output_name, - ); + debug!("Output destroyed: {}", output_name); if let Some(bg_layer_index) = self.background_layers.iter() .position(|bg_layers| bg_layers.output_name == output_name) @@ -631,10 +576,10 @@ Restart multibg-sway or expect broken wallpapers or low quality due to scaling" ); drop(removed_bg_layer); - } - else { + } else { error!( - "Ignoring destroyed output with unknown name '{}', known outputs were: {}", + "Ignoring destroyed output with unknown name '{}', \ + known outputs were: {}", output_name, self.background_layers.iter() .map(|bg_layer| bg_layer.output_name.as_str()) @@ -647,10 +592,11 @@ Restart multibg-sway or expect broken wallpapers or low quality due to scaling" } impl ProvidesRegistryState for State { + registry_handlers![OutputState]; + fn registry(&mut self) -> &mut RegistryState { &mut self.registry_state } - registry_handlers![OutputState]; } impl ShmHandler for State { @@ -735,16 +681,12 @@ pub struct BackgroundLayer { pub dmabuf_feedback: Option, } -impl BackgroundLayer -{ - pub fn draw_workspace_bg(&mut self, workspace_name: &str) - { +impl BackgroundLayer { + pub fn draw_workspace_bg(&mut self, workspace_name: &str) { if !self.configured { - error!( -"Cannot draw wallpaper image on the not yet configured layer for output: {}", - self.output_name - ); - return; + error!("Cannot draw wallpaper image on the not yet configured \ + layer for output: {}", self.output_name); + return } let Some(workspace_bg) = self.workspace_backgrounds.iter() @@ -754,14 +696,15 @@ impl BackgroundLayer ) else { error!( -"There is no wallpaper image on output '{}' for workspace '{}', only for: {}", + "There is no wallpaper image on output {} for workspace {}, \ + only for: {}", self.output_name, workspace_name, self.workspace_backgrounds.iter() .map(|workspace_bg| workspace_bg.workspace_name.as_str()) .collect::>().join(", ") ); - return; + return }; let wallpaper = &workspace_bg.wallpaper; @@ -794,10 +737,8 @@ impl BackgroundLayer self.current_wallpaper = Some(Rc::clone(wallpaper)); self.queued_wallpaper = None; - debug!( - "Setting wallpaper on output '{}' for workspace: {}", - self.output_name, workspace_name - ); + debug!("Setting wallpaper on output {} for workspace: {}", + self.output_name, workspace_name); } } @@ -850,7 +791,7 @@ impl Memory { fn dmabuf_params_destroy_eq( &mut self, - other_params: &ZwpLinuxBufferParamsV1 + other_params: &ZwpLinuxBufferParamsV1, ) -> bool { if let Memory::Dmabuf { params: params_option, .. } = self { if let Some(params) = params_option { @@ -955,12 +896,7 @@ fn fallback_shm_load_wallpapers( let bg_layer = &mut state.background_layers[bg_layer_index]; bg_layer.dmabuf_feedback = None; bg_layer.workspace_backgrounds.clear(); - load_wallpapers( - state, - qh, - bg_layer_index, - None, - ); + load_wallpapers(state, qh, bg_layer_index, None); } fn load_wallpapers( @@ -993,7 +929,7 @@ fn load_wallpapers( // https://github.com/gergo-salyi/multibg-sway/issues/6 (width as usize * 3).next_multiple_of(4) }, - _ => unreachable!() + _ => unreachable!(), }; let shm_size = shm_stride * height as usize; let mut workspace_backgrounds = Vec::new(); @@ -1048,7 +984,7 @@ fn load_wallpapers( width as usize * 4, wl_shm::Format::Xrgb8888, state.color_transform, - &mut resizer + &mut resizer, ) { error!("Failed to load wallpaper: {e:#}"); error_count += 1; @@ -1095,7 +1031,7 @@ fn load_wallpapers( shm_stride, state.shm_format, state.color_transform, - &mut resizer + &mut resizer, ) { error!("Failed to load wallpaper: {e:#}"); error_count += 1; @@ -1108,7 +1044,7 @@ fn load_wallpapers( shm_stride.try_into().unwrap(), state.shm_format, (), - qh + qh, ); workspace_backgrounds.push(WorkspaceBackground { workspace_name: wallpaper_file.workspace, @@ -1208,12 +1144,7 @@ fn handle_dmabuf_feedback( debug!("DMA-BUF feedback changed, reloading wallpapers"); bg_layer.workspace_backgrounds.clear(); } - load_wallpapers( - state, - qh, - bg_layer_pos, - Some(gpu_uploader), - ); + load_wallpapers(state, qh, bg_layer_pos, Some(gpu_uploader)); Ok(()) }