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:
parent
601e16af0e
commit
06a762caca
3 changed files with 5 additions and 11 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
|
@ -1336,6 +1336,7 @@ dependencies = [
|
|||
"cosmic-settings-accessibility-subscription",
|
||||
"cosmic-settings-daemon-config",
|
||||
"dirs",
|
||||
"enumflags2",
|
||||
"futures-util",
|
||||
"greetd_ipc",
|
||||
"i18n-embed",
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ image = { version = "0.25", default-features = false, features = [
|
|||
] }
|
||||
# JPEG-XL support
|
||||
jxl-oxide = { version = "0.12.6", features = ["image"] }
|
||||
enumflags2 = "0.7.12"
|
||||
|
||||
[dependencies.greetd_ipc]
|
||||
version = "0.10.3"
|
||||
|
|
|
|||
|
|
@ -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> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue