diff --git a/Cargo.lock b/Cargo.lock index 8dcea6e..5de5729 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5,12 +5,12 @@ version = 3 [[package]] name = "accesskit" version = "0.11.0" -source = "git+https://github.com/wash2/accesskit.git?tag=v0.11.0#2dee3df0a525d727df9f54ae71cfe8b47d7c2751" +source = "git+https://github.com/wash2/accesskit.git?tag=winit-0.28#db6f2587f663eafd8f7888e8507baa3a092599b0" [[package]] name = "accesskit_consumer" version = "0.15.0" -source = "git+https://github.com/wash2/accesskit.git?tag=v0.11.0#2dee3df0a525d727df9f54ae71cfe8b47d7c2751" +source = "git+https://github.com/wash2/accesskit.git?tag=winit-0.28#db6f2587f663eafd8f7888e8507baa3a092599b0" dependencies = [ "accesskit", ] @@ -18,7 +18,7 @@ dependencies = [ [[package]] name = "accesskit_unix" version = "0.4.0" -source = "git+https://github.com/wash2/accesskit.git?tag=v0.11.0#2dee3df0a525d727df9f54ae71cfe8b47d7c2751" +source = "git+https://github.com/wash2/accesskit.git?tag=winit-0.28#db6f2587f663eafd8f7888e8507baa3a092599b0" dependencies = [ "accesskit", "accesskit_consumer", @@ -109,15 +109,6 @@ dependencies = [ "libc", ] -[[package]] -name = "ansi_term" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" -dependencies = [ - "winapi", -] - [[package]] name = "apply" version = "0.3.0" @@ -358,17 +349,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -398,25 +378,22 @@ checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "bindgen" -version = "0.59.2" +version = "0.69.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bd2a9a458e8f4304c52c43ebb0cfbd520289f8379a52e329a38afda99bf8eb8" +checksum = "9ffcebc3849946a7170a05992aac39da343a90676ab392c51a4280981d6379c2" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.1", "cexpr", "clang-sys", - "clap", - "env_logger 0.9.3", "lazy_static", "lazycell", - "log", "peeking_take_while", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "which", + "syn 2.0.38", ] [[package]] @@ -602,22 +579,6 @@ checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" dependencies = [ "glob", "libc", - "libloading 0.7.4", -] - -[[package]] -name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "ansi_term", - "atty", - "bitflags 1.3.2", - "strsim 0.8.0", - "textwrap", - "unicode-width", - "vec_map", ] [[package]] @@ -747,7 +708,7 @@ dependencies = [ [[package]] name = "cosmic-config" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/libcosmic#484417787a4d7ebf7c3db9473729563ee917e546" dependencies = [ "atomicwrites", "calloop", @@ -762,7 +723,7 @@ dependencies = [ [[package]] name = "cosmic-config-derive" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/libcosmic#484417787a4d7ebf7c3db9473729563ee917e546" dependencies = [ "quote", "syn 1.0.109", @@ -775,7 +736,7 @@ dependencies = [ "chrono", "cosmic-bg-config", "cosmic-config", - "env_logger 0.10.0", + "env_logger", "freedesktop_entry_parser", "greetd_ipc", "libcosmic", @@ -810,7 +771,7 @@ dependencies = [ [[package]] name = "cosmic-theme" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/libcosmic#484417787a4d7ebf7c3db9473729563ee917e546" dependencies = [ "almost", "cosmic-config", @@ -951,7 +912,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", + "strsim", "syn 2.0.38", ] @@ -1105,19 +1066,6 @@ dependencies = [ "syn 2.0.38", ] -[[package]] -name = "env_logger" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - [[package]] name = "env_logger" version = "0.10.0" @@ -1696,15 +1644,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.3" @@ -1723,15 +1662,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" -[[package]] -name = "home" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" -dependencies = [ - "windows-sys 0.48.0", -] - [[package]] name = "humantime" version = "2.1.0" @@ -1764,7 +1694,7 @@ dependencies = [ [[package]] name = "iced" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/iced//?branch=sctk-session-lock#88643cb6beae60124c99abfa20cf98170e57c1c1" dependencies = [ "iced_accessibility", "iced_core", @@ -1779,7 +1709,7 @@ dependencies = [ [[package]] name = "iced_accessibility" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/iced//?branch=sctk-session-lock#88643cb6beae60124c99abfa20cf98170e57c1c1" dependencies = [ "accesskit", "accesskit_unix", @@ -1788,14 +1718,14 @@ dependencies = [ [[package]] name = "iced_core" version = "0.10.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/iced//?branch=sctk-session-lock#88643cb6beae60124c99abfa20cf98170e57c1c1" dependencies = [ "bitflags 1.3.2", "iced_accessibility", "instant", "log", "palette", - "smithay-client-toolkit 0.17.0", + "smithay-client-toolkit 0.18.0", "thiserror", "twox-hash", ] @@ -1803,7 +1733,7 @@ dependencies = [ [[package]] name = "iced_futures" version = "0.7.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/iced//?branch=sctk-session-lock#88643cb6beae60124c99abfa20cf98170e57c1c1" dependencies = [ "futures", "iced_core", @@ -1816,7 +1746,7 @@ dependencies = [ [[package]] name = "iced_graphics" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/iced//?branch=sctk-session-lock#88643cb6beae60124c99abfa20cf98170e57c1c1" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -1834,7 +1764,7 @@ dependencies = [ [[package]] name = "iced_renderer" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/iced//?branch=sctk-session-lock#88643cb6beae60124c99abfa20cf98170e57c1c1" dependencies = [ "iced_graphics", "iced_tiny_skia", @@ -1847,19 +1777,19 @@ dependencies = [ [[package]] name = "iced_runtime" version = "0.1.1" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/iced//?branch=sctk-session-lock#88643cb6beae60124c99abfa20cf98170e57c1c1" dependencies = [ "iced_accessibility", "iced_core", "iced_futures", - "smithay-client-toolkit 0.17.0", + "smithay-client-toolkit 0.18.0", "thiserror", ] [[package]] name = "iced_sctk" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/iced//?branch=sctk-session-lock#88643cb6beae60124c99abfa20cf98170e57c1c1" dependencies = [ "enum-repr", "float-cmp", @@ -1871,7 +1801,7 @@ dependencies = [ "itertools", "lazy_static", "raw-window-handle", - "smithay-client-toolkit 0.17.0", + "smithay-client-toolkit 0.18.0", "smithay-clipboard", "thiserror", "tracing", @@ -1883,7 +1813,7 @@ dependencies = [ [[package]] name = "iced_style" version = "0.9.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/iced//?branch=sctk-session-lock#88643cb6beae60124c99abfa20cf98170e57c1c1" dependencies = [ "iced_core", "once_cell", @@ -1893,7 +1823,7 @@ dependencies = [ [[package]] name = "iced_tiny_skia" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/iced//?branch=sctk-session-lock#88643cb6beae60124c99abfa20cf98170e57c1c1" dependencies = [ "bytemuck", "cosmic-text", @@ -1911,7 +1841,7 @@ dependencies = [ [[package]] name = "iced_wgpu" version = "0.11.1" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/iced//?branch=sctk-session-lock#88643cb6beae60124c99abfa20cf98170e57c1c1" dependencies = [ "bitflags 1.3.2", "bytemuck", @@ -1933,14 +1863,14 @@ dependencies = [ [[package]] name = "iced_widget" version = "0.1.3" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/iced//?branch=sctk-session-lock#88643cb6beae60124c99abfa20cf98170e57c1c1" dependencies = [ "iced_renderer", "iced_runtime", "iced_style", "num-traits", "ouroboros", - "smithay-client-toolkit 0.17.0", + "smithay-client-toolkit 0.18.0", "thiserror", "unicode-segmentation", ] @@ -2041,7 +1971,7 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi", "libc", "windows-sys 0.48.0", ] @@ -2052,7 +1982,7 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi", "rustix 0.38.20", "windows-sys 0.48.0", ] @@ -2166,7 +2096,7 @@ checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libcosmic" version = "0.1.0" -source = "git+https://github.com/pop-os/libcosmic#f3eb41c1d2a6aaef76f40bc872a71153f90fc113" +source = "git+https://github.com/pop-os/libcosmic#484417787a4d7ebf7c3db9473729563ee917e546" dependencies = [ "apply", "ashpd", @@ -2354,6 +2284,24 @@ dependencies = [ "libc", ] +[[package]] +name = "memmap2" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a5a03cefb0d953ec0be133036f14e109412fa594edc2f77227249db66cc3ed" +dependencies = [ + "libc", +] + +[[package]] +name = "memmap2" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deaba38d7abf1d4cca21cc89e932e542ba2b9258664d2a9ef0e61512039c9375" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.6.5" @@ -2608,7 +2556,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.3", + "hermit-abi", "libc", ] @@ -2736,9 +2684,9 @@ dependencies = [ [[package]] name = "pam-sys" -version = "1.0.0-alpha4" +version = "1.0.0-alpha5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9dfd42858f6a6bb1081079fd9dc259ca3e2aaece6cb689fd36b1058046c969" +checksum = "ce9484729b3e52c0bacdc5191cb6a6a5f31ef4c09c5e4ab1209d3340ad9e997b" dependencies = [ "bindgen", "libc", @@ -3526,7 +3474,34 @@ dependencies = [ "wayland-protocols 0.31.0", "wayland-protocols-wlr", "wayland-scanner 0.31.0", - "xkbcommon", + "xkbcommon 0.5.1", + "xkeysym", +] + +[[package]] +name = "smithay-client-toolkit" +version = "0.18.0" +source = "git+https://github.com/smithay/client-toolkit?rev=2e9bf9f#2e9bf9f31698851ca373e5f1e7ba3e6e804e4db1" +dependencies = [ + "bitflags 2.4.1", + "bytemuck", + "calloop", + "calloop-wayland-source", + "cursor-icon", + "libc", + "log", + "memmap2 0.9.0", + "pkg-config", + "rustix 0.38.20", + "thiserror", + "wayland-backend 0.3.2", + "wayland-client 0.31.1", + "wayland-csd-frame", + "wayland-cursor 0.31.0", + "wayland-protocols 0.31.0", + "wayland-protocols-wlr", + "wayland-scanner 0.31.0", + "xkbcommon 0.7.0", "xkeysym", ] @@ -3621,12 +3596,6 @@ dependencies = [ "float-cmp", ] -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - [[package]] name = "strsim" version = "0.10.0" @@ -3693,7 +3662,7 @@ dependencies = [ [[package]] name = "taffy" version = "0.3.11" -source = "git+https://github.com/DioxusLabs/taffy#23ff477566b0239f04d3b89a2b3a4da2495e9577" +source = "git+https://github.com/DioxusLabs/taffy#1876f72bee5e376023eaa518aa7b8a34c769bd1b" dependencies = [ "arrayvec", "grid", @@ -3723,15 +3692,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - [[package]] name = "thiserror" version = "1.0.49" @@ -4070,12 +4030,6 @@ dependencies = [ "tiny-skia-path", ] -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - [[package]] name = "version_check" version = "0.9.4" @@ -4531,18 +4485,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix 0.38.20", -] - [[package]] name = "widestring" version = "1.0.2" @@ -4825,6 +4767,17 @@ dependencies = [ "memmap2 0.7.1", ] +[[package]] +name = "xkbcommon" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13867d259930edc7091a6c41b4ce6eee464328c6ff9659b7e4c668ca20d4c91e" +dependencies = [ + "libc", + "memmap2 0.8.0", + "xkeysym", +] + [[package]] name = "xkeysym" version = "0.2.0" diff --git a/Cargo.toml b/Cargo.toml index 08d8772..f78eab8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,3 +31,14 @@ features = ["tokio", "wayland"] [dependencies.tokio] version = "1.33.0" features = ["full"] + +[patch."https://github.com/pop-os/libcosmic"] +iced = { git = "https://github.com/pop-os/iced//", branch = "sctk-session-lock" } +iced_runtime = { git = "https://github.com/pop-os/iced//", branch = "sctk-session-lock" } +iced_renderer = { git = "https://github.com/pop-os/iced//", branch = "sctk-session-lock" } +iced_core = { git = "https://github.com/pop-os/iced//", branch = "sctk-session-lock" } +iced_widget = { git = "https://github.com/pop-os/iced//", branch = "sctk-session-lock" } +iced_futures = { git = "https://github.com/pop-os/iced//", branch = "sctk-session-lock" } +iced_tiny_skia = { git = "https://github.com/pop-os/iced//", branch = "sctk-session-lock" } +iced_style = { git = "https://github.com/pop-os/iced//", branch = "sctk-session-lock" } +iced_sctk = { git = "https://github.com/pop-os/iced//", branch = "sctk-session-lock" } diff --git a/src/greeter.rs b/src/greeter.rs index ee5af64..0f61c06 100644 --- a/src/greeter.rs +++ b/src/greeter.rs @@ -616,7 +616,7 @@ impl cosmic::Application for App { column = column.push( //TODO: use button - widget::pick_list( + iced::widget::pick_list( &self.session_names, Some(self.selected_session.clone()), Message::Session, diff --git a/src/image_container.rs b/src/image_container.rs index 3529342..769a202 100644 --- a/src/image_container.rs +++ b/src/image_container.rs @@ -122,7 +122,7 @@ where viewport: &Rectangle, ) { match &self.image_opt { - Some(image) => draw(renderer, layout, image, self.content_fit), + Some(image) => draw(renderer, layout, image, self.content_fit, [0.0, 0.0, 0.0, 0.0]), None => {} } diff --git a/src/locker.rs b/src/locker.rs index e2f1eed..047fd65 100644 --- a/src/locker.rs +++ b/src/locker.rs @@ -6,14 +6,14 @@ use cosmic::{ executor, iced::{ self, alignment, - event::wayland::{Event as WaylandEvent, LayerEvent, OutputEvent}, + event::wayland::{Event as WaylandEvent, OutputEvent, SessionLockEvent}, futures::{self, SinkExt}, subscription, - wayland::{ - actions::layer_surface::{IcedMargin, IcedOutput, SctkLayerSurfaceSettings}, - layer_surface::{ - destroy_layer_surface, get_layer_surface, Anchor, KeyboardInteractivity, Layer, - }, + wayland::session_lock::{ + get_lock_surface, + lock, + destroy_lock_surface, + unlock, }, Length, Subscription, }, @@ -197,7 +197,7 @@ pub struct Flags { pub enum Message { None, OutputEvent(OutputEvent, WlOutput), - LayerEvent(LayerEvent, SurfaceId), + SessionLockEvent(SessionLockEvent), Channel(mpsc::Sender), Prompt(String, bool, Option), Submit, @@ -263,7 +263,7 @@ impl cosmic::Application for App { error_opt: None, exited: false, }, - Command::none(), + lock(), ) } @@ -337,24 +337,7 @@ impl cosmic::Application for App { } return Command::batch([ - get_layer_surface(SctkLayerSurfaceSettings { - id: surface_id, - layer: Layer::Overlay, - keyboard_interactivity: KeyboardInteractivity::Exclusive, - pointer_interactivity: true, - anchor: Anchor::TOP | Anchor::BOTTOM | Anchor::LEFT | Anchor::RIGHT, - output: IcedOutput::Output(output), - namespace: "cosmic-locker".into(), - size: Some((None, None)), - margin: IcedMargin { - top: 0, - bottom: 0, - left: 0, - right: 0, - }, - exclusive_zone: -1, - size_limits: iced::Limits::NONE.min_width(1.0).min_height(1.0), - }), + get_lock_surface(surface_id, output), widget::text_input::focus(text_input_id(surface_id)), ]); } @@ -363,7 +346,7 @@ impl cosmic::Application for App { match self.surface_ids.remove(&output) { Some(surface_id) => { self.surface_images.remove(&surface_id); - return destroy_layer_surface(surface_id); + return destroy_lock_surface(surface_id); } None => { log::warn!("output {}: no surface found", output.id()); @@ -375,18 +358,13 @@ impl cosmic::Application for App { } } } - Message::LayerEvent(layer_event, surface_id) => match layer_event { - LayerEvent::Focused => { + Message::SessionLockEvent(session_lock_event) => match session_lock_event { + SessionLockEvent::Focused(_, surface_id) => { log::info!("focus surface {}", surface_id.0); self.active_surface_id_opt = Some(surface_id); return widget::text_input::focus(text_input_id(surface_id)); } - LayerEvent::Unfocused => { - log::info!("unfocus surface {}", surface_id.0); - } - LayerEvent::Done => { - log::info!("done with surface {}", surface_id.0); - } + _ => {} }, Message::Channel(value_tx) => { self.value_tx_opt = Some(value_tx); @@ -427,10 +405,11 @@ impl cosmic::Application for App { let mut commands = Vec::new(); for (_output, surface_id) in self.surface_ids.drain() { self.surface_images.remove(&surface_id); - commands.push(destroy_layer_surface(surface_id)); + commands.push(destroy_lock_surface(surface_id)); } + commands.push(unlock()); //TODO: cleaner method to exit? - commands.push(Command::perform(async { process::exit(0) }, |x| x)); + // commands.push(Command::perform(async { process::exit(0) }, |x| x)); return Command::batch(commands); } } @@ -630,9 +609,7 @@ impl cosmic::Application for App { WaylandEvent::Output(output_event, output) => { Some(Message::OutputEvent(output_event, output)) } - WaylandEvent::Layer(layer_event, _surface, surface_id) => { - Some(Message::LayerEvent(layer_event, surface_id)) - } + WaylandEvent::SessionLock(evt) => Some(Message::SessionLockEvent(evt)), _ => None, }, _ => None,