fix: clippy lints
This commit is contained in:
parent
7aead1ce47
commit
1e5af14bc4
3 changed files with 9 additions and 21 deletions
|
|
@ -8,13 +8,11 @@ use crate::wayland_subscription::ToplevelUpdate;
|
||||||
use crate::wayland_subscription::WaylandImage;
|
use crate::wayland_subscription::WaylandImage;
|
||||||
use crate::wayland_subscription::WaylandRequest;
|
use crate::wayland_subscription::WaylandRequest;
|
||||||
use crate::wayland_subscription::WaylandUpdate;
|
use crate::wayland_subscription::WaylandUpdate;
|
||||||
use crate::wayland_subscription::WorkspaceUpdate;
|
|
||||||
use cctk::sctk::reexports::calloop::channel::Sender;
|
use cctk::sctk::reexports::calloop::channel::Sender;
|
||||||
use cctk::toplevel_info::ToplevelInfo;
|
use cctk::toplevel_info::ToplevelInfo;
|
||||||
use cctk::wayland_client::protocol::wl_data_device_manager::DndAction;
|
use cctk::wayland_client::protocol::wl_data_device_manager::DndAction;
|
||||||
use cctk::wayland_client::protocol::wl_seat::WlSeat;
|
use cctk::wayland_client::protocol::wl_seat::WlSeat;
|
||||||
use cosmic::cosmic_config::{Config, CosmicConfigEntry};
|
use cosmic::cosmic_config::{Config, CosmicConfigEntry};
|
||||||
use cosmic::desktop::IconSource;
|
|
||||||
use cosmic::desktop::{
|
use cosmic::desktop::{
|
||||||
app_id_or_fallback_matches, load_applications_for_app_ids, DesktopEntryData,
|
app_id_or_fallback_matches, load_applications_for_app_ids, DesktopEntryData,
|
||||||
};
|
};
|
||||||
|
|
@ -1064,12 +1062,9 @@ impl cosmic::Application for CosmicAppList {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
WaylandUpdate::Workspace(event) => match event {
|
WaylandUpdate::Workspace(handle) => {
|
||||||
WorkspaceUpdate::Enter(handle) => {
|
self.active_workspace = Some(handle);
|
||||||
self.active_workspace = Some(handle);
|
}
|
||||||
}
|
|
||||||
_ => {}
|
|
||||||
},
|
|
||||||
WaylandUpdate::ActivationToken {
|
WaylandUpdate::ActivationToken {
|
||||||
token,
|
token,
|
||||||
exec,
|
exec,
|
||||||
|
|
@ -1370,7 +1365,7 @@ impl cosmic::Application for CosmicAppList {
|
||||||
.config
|
.config
|
||||||
.favorites
|
.favorites
|
||||||
.iter()
|
.iter()
|
||||||
.any(|x| app_id_or_fallback_matches(&x, desktop_info));
|
.any(|x| app_id_or_fallback_matches(x, desktop_info));
|
||||||
|
|
||||||
let mut content = column![container(
|
let mut content = column![container(
|
||||||
iced::widget::text(&desktop_info.name)
|
iced::widget::text(&desktop_info.name)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
use crate::wayland_subscription::{
|
use crate::wayland_subscription::{
|
||||||
ToplevelRequest, ToplevelUpdate, WaylandImage, WaylandRequest, WaylandUpdate, WorkspaceUpdate,
|
ToplevelRequest, ToplevelUpdate, WaylandImage, WaylandRequest, WaylandUpdate,
|
||||||
};
|
};
|
||||||
use std::{
|
use std::{
|
||||||
os::{
|
os::{
|
||||||
|
|
@ -114,11 +114,9 @@ impl WorkspaceHandler for AppData {
|
||||||
.state
|
.state
|
||||||
.contains(&WEnum::Value(WorkspaceUpdateState::Active))
|
.contains(&WEnum::Value(WorkspaceUpdateState::Active))
|
||||||
{
|
{
|
||||||
let _ =
|
let _ = self
|
||||||
self.tx
|
.tx
|
||||||
.unbounded_send(WaylandUpdate::Workspace(WorkspaceUpdate::Enter(
|
.unbounded_send(WaylandUpdate::Workspace(workspace.handle.clone()));
|
||||||
workspace.handle.clone(),
|
|
||||||
)));
|
|
||||||
break 'workspaces_loop;
|
break 'workspaces_loop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ pub enum WaylandUpdate {
|
||||||
Init(calloop::channel::Sender<WaylandRequest>),
|
Init(calloop::channel::Sender<WaylandRequest>),
|
||||||
Finished,
|
Finished,
|
||||||
Toplevel(ToplevelUpdate),
|
Toplevel(ToplevelUpdate),
|
||||||
Workspace(WorkspaceUpdate),
|
Workspace(ZcosmicWorkspaceHandleV1),
|
||||||
ActivationToken {
|
ActivationToken {
|
||||||
token: Option<String>,
|
token: Option<String>,
|
||||||
exec: String,
|
exec: String,
|
||||||
|
|
@ -115,11 +115,6 @@ pub enum ToplevelUpdate {
|
||||||
Remove(ZcosmicToplevelHandleV1),
|
Remove(ZcosmicToplevelHandleV1),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
|
||||||
pub enum WorkspaceUpdate {
|
|
||||||
Enter(ZcosmicWorkspaceHandleV1),
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum WaylandRequest {
|
pub enum WaylandRequest {
|
||||||
Toplevel(ToplevelRequest),
|
Toplevel(ToplevelRequest),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue