diff --git a/cosmic-app-list/src/app.rs b/cosmic-app-list/src/app.rs index 4712bc88..5a4e802d 100755 --- a/cosmic-app-list/src/app.rs +++ b/cosmic-app-list/src/app.rs @@ -8,13 +8,11 @@ use crate::wayland_subscription::ToplevelUpdate; use crate::wayland_subscription::WaylandImage; use crate::wayland_subscription::WaylandRequest; use crate::wayland_subscription::WaylandUpdate; -use crate::wayland_subscription::WorkspaceUpdate; use cctk::sctk::reexports::calloop::channel::Sender; use cctk::toplevel_info::ToplevelInfo; use cctk::wayland_client::protocol::wl_data_device_manager::DndAction; use cctk::wayland_client::protocol::wl_seat::WlSeat; use cosmic::cosmic_config::{Config, CosmicConfigEntry}; -use cosmic::desktop::IconSource; use cosmic::desktop::{ 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 { - WorkspaceUpdate::Enter(handle) => { - self.active_workspace = Some(handle); - } - _ => {} - }, + WaylandUpdate::Workspace(handle) => { + self.active_workspace = Some(handle); + } WaylandUpdate::ActivationToken { token, exec, @@ -1370,7 +1365,7 @@ impl cosmic::Application for CosmicAppList { .config .favorites .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( iced::widget::text(&desktop_info.name) diff --git a/cosmic-app-list/src/wayland_handler.rs b/cosmic-app-list/src/wayland_handler.rs index a6719873..589a2a57 100644 --- a/cosmic-app-list/src/wayland_handler.rs +++ b/cosmic-app-list/src/wayland_handler.rs @@ -1,5 +1,5 @@ use crate::wayland_subscription::{ - ToplevelRequest, ToplevelUpdate, WaylandImage, WaylandRequest, WaylandUpdate, WorkspaceUpdate, + ToplevelRequest, ToplevelUpdate, WaylandImage, WaylandRequest, WaylandUpdate, }; use std::{ os::{ @@ -114,11 +114,9 @@ impl WorkspaceHandler for AppData { .state .contains(&WEnum::Value(WorkspaceUpdateState::Active)) { - let _ = - self.tx - .unbounded_send(WaylandUpdate::Workspace(WorkspaceUpdate::Enter( - workspace.handle.clone(), - ))); + let _ = self + .tx + .unbounded_send(WaylandUpdate::Workspace(workspace.handle.clone())); break 'workspaces_loop; } } diff --git a/cosmic-app-list/src/wayland_subscription.rs b/cosmic-app-list/src/wayland_subscription.rs index a0e01e6c..889c8f74 100644 --- a/cosmic-app-list/src/wayland_subscription.rs +++ b/cosmic-app-list/src/wayland_subscription.rs @@ -99,7 +99,7 @@ pub enum WaylandUpdate { Init(calloop::channel::Sender), Finished, Toplevel(ToplevelUpdate), - Workspace(WorkspaceUpdate), + Workspace(ZcosmicWorkspaceHandleV1), ActivationToken { token: Option, exec: String, @@ -115,11 +115,6 @@ pub enum ToplevelUpdate { Remove(ZcosmicToplevelHandleV1), } -#[derive(Clone, Debug)] -pub enum WorkspaceUpdate { - Enter(ZcosmicWorkspaceHandleV1), -} - #[derive(Clone, Debug)] pub enum WaylandRequest { Toplevel(ToplevelRequest),