locker: Rely on cosmic-bg for showing background

Requires https://github.com/pop-os/cosmic-comp/pull/2792 and
https://github.com/pop-os/cosmic-bg/pull/144.
This commit is contained in:
Ian Douglas Scott 2026-08-28 14:49:47 -07:00 • committed by Jeremy Soller
parent 601e16af0e
commit 06a762caca
3 changed files with 5 additions and 11 deletions

View file

@ -663,6 +663,7 @@ impl cosmic::Application for App {
/// Creates the application, and optionally emits command on initialize.
fn init(mut core: Core, flags: Self::Flags) -> (Self, Task<Self::Message>) {
core.set_app_type(cosmic::core::AppType::System);
core.set_auto_blur(enumflags2::BitFlags::empty());
let (mut common, common_task) = Common::init(core);
common.on_output_event = Some(Box::new(|output_event, output| {
Message::OutputEvent(output_event, output)
@ -1173,17 +1174,8 @@ impl cosmic::Application for App {
}
/// Creates a view after each update.
fn view_window(&self, surface_id: SurfaceId) -> Element<'_, Self::Message> {
let img = self
.common
.surface_images
.get(&surface_id)
.unwrap_or(&self.common.fallback_background);
widget::image(img)
.content_fit(iced::ContentFit::Cover)
.width(Length::Fill)
.height(Length::Fill)
.into()
fn view_window(&self, _surface_id: SurfaceId) -> Element<'_, Self::Message> {
widget::space::horizontal().into()
}
fn subscription(&self) -> Subscription<Self::Message> {