workspaces: Fix clippy lints
This commit is contained in:
parent
ba832143fc
commit
f2affe52fb
2 changed files with 11 additions and 11 deletions
|
|
@ -23,14 +23,16 @@ use crate::wayland::{WorkspaceEvent, WorkspaceList};
|
||||||
use crate::wayland_subscription::{workspaces, WorkspacesUpdate};
|
use crate::wayland_subscription::{workspaces, WorkspacesUpdate};
|
||||||
|
|
||||||
pub fn run() -> cosmic::iced::Result {
|
pub fn run() -> cosmic::iced::Result {
|
||||||
let mut settings = Settings::default();
|
let settings = Settings {
|
||||||
settings.initial_surface = InitialSurface::XdgWindow(SctkWindowSettings {
|
initial_surface: InitialSurface::XdgWindow(SctkWindowSettings {
|
||||||
iced_settings: cosmic::iced_native::window::Settings {
|
iced_settings: cosmic::iced_native::window::Settings {
|
||||||
size: (32, 32),
|
size: (32, 32),
|
||||||
|
..Default::default()
|
||||||
|
},
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
}),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
};
|
||||||
IcedWorkspacesApplet::run(settings)
|
IcedWorkspacesApplet::run(settings)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -117,12 +117,10 @@ pub fn spawn_workspaces(tx: mpsc::Sender<WorkspaceList>) -> SyncSender<Workspace
|
||||||
} else {
|
} else {
|
||||||
w_i.wrapping_add(1)
|
w_i.wrapping_add(1)
|
||||||
}
|
}
|
||||||
|
} else if w_i == 0 {
|
||||||
|
max_w
|
||||||
} else {
|
} else {
|
||||||
if w_i == 0 {
|
w_i.wrapping_sub(1)
|
||||||
max_w
|
|
||||||
} else {
|
|
||||||
w_i.wrapping_sub(1)
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
if let Some(w) = w_g.workspaces.get(d_i) {
|
if let Some(w) = w_g.workspaces.get(d_i) {
|
||||||
w.handle.activate();
|
w.handle.activate();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue