From 7aead1ce472f6edd29303a989f1923daabe75418 Mon Sep 17 00:00:00 2001 From: Ryan Brue Date: Wed, 3 Apr 2024 06:47:25 -0500 Subject: [PATCH] fix: don't take screencopy on every new toplevel --- cosmic-app-list/src/app.rs | 9 +-------- cosmic-app-list/src/wayland_handler.rs | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/cosmic-app-list/src/app.rs b/cosmic-app-list/src/app.rs index f9a19aeb..4712bc88 100755 --- a/cosmic-app-list/src/app.rs +++ b/cosmic-app-list/src/app.rs @@ -431,7 +431,6 @@ const TOPLEVEL_BUTTON_HEIGHT: f32 = 130.0; pub fn toplevel_button<'a, Msg>( img: Option, - icon: &IconSource, on_press: Msg, title: String, text_size: f32, @@ -456,11 +455,7 @@ where .content_fit(cosmic::iced_core::ContentFit::Contain), ) } else { - Element::from( - icon.as_cosmic_icon() - .width(Length::Fill) - .height(Length::Fill), - ) + Image::new(Handle::from_pixels(1, 1, vec![0, 0, 0, 255])).into() }) .style(Container::Custom(Box::new(move |theme| { container::Appearance { @@ -1475,7 +1470,6 @@ impl cosmic::Application for CosmicAppList { }; content = content.push(toplevel_button( img.clone(), - &desktop_info.icon, Message::Toggle(handle.clone()), title, 10.0, @@ -1496,7 +1490,6 @@ impl cosmic::Application for CosmicAppList { }; content = content.push(toplevel_button( img.clone(), - &desktop_info.icon, Message::Toggle(handle.clone()), title, 10.0, diff --git a/cosmic-app-list/src/wayland_handler.rs b/cosmic-app-list/src/wayland_handler.rs index 46646b73..a6719873 100644 --- a/cosmic-app-list/src/wayland_handler.rs +++ b/cosmic-app-list/src/wayland_handler.rs @@ -226,7 +226,6 @@ impl ToplevelInfoHandler for AppData { toplevel.clone(), info.clone(), ))); - self.send_image(toplevel.clone()); } }