fix: don't take screencopy on every new toplevel

This commit is contained in:
Ryan Brue 2024-04-03 06:47:25 -05:00 committed by Ashley Wulber
parent ed335b256a
commit 7aead1ce47
2 changed files with 1 additions and 9 deletions

View file

@ -431,7 +431,6 @@ const TOPLEVEL_BUTTON_HEIGHT: f32 = 130.0;
pub fn toplevel_button<'a, Msg>(
img: Option<WaylandImage>,
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,

View file

@ -226,7 +226,6 @@ impl ToplevelInfoHandler for AppData {
toplevel.clone(),
info.clone(),
)));
self.send_image(toplevel.clone());
}
}