Skip to content

Commit 2fd5098

Browse files
committed
chore: update deps
1 parent 4875448 commit 2fd5098

3 files changed

Lines changed: 59 additions & 62 deletions

File tree

Cargo.lock

Lines changed: 36 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ cosmic-app-list-config = { git = "https://github.com/pop-os/cosmic-applets" }
5050
[profile.release]
5151
lto = "thin"
5252

53-
[patch."https://github.com/pop-os/libcosmic/"]
54-
libcosmic = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-v2" }
55-
cosmic-config = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-v2" }
53+
# [patch."https://github.com/pop-os/libcosmic/"]
54+
# libcosmic = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-v2" }
55+
# cosmic-config = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-v2" }
5656
# cosmic-theme = { git = "https://github.com/pop-os/libcosmic//", branch = "theme-v2" }
5757
# cosmic-config = { path = "../libcosmic/cosmic-config/" }
5858
# libcosmic = { path = "../libcosmic/" }

src/app.rs

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -336,15 +336,14 @@ impl CosmicAppLibrary {
336336
self.needs_clear = true;
337337
let id = window::Id::unique();
338338
self.dummy_id = Some(id);
339-
Task::batch(vec![
340-
cosmic::surface::surface_task(simple_layer_shell::<Message>(
341-
|| LiveSettings {
342-
padding: Some(IcedMargin::default()),
343-
corners: Some(CornerRadius::default()),
344-
blur: Some(false),
345-
},
346-
move || {
347-
SctkLayerSurfaceSettings {
339+
cosmic::surface::surface_task(simple_layer_shell::<Message>(
340+
|| LiveSettings {
341+
padding: Some(IcedMargin::default()),
342+
corners: Some(CornerRadius::default()),
343+
blur: Some(false),
344+
},
345+
move || {
346+
SctkLayerSurfaceSettings {
348347
id,
349348
layer: wlr_layer::Layer::Bottom,
350349
keyboard_interactivity: wlr_layer::KeyboardInteractivity::None,
@@ -358,11 +357,9 @@ impl CosmicAppLibrary {
358357
exclusive_zone: -1,
359358
size_limits: Limits::NONE,
360359
}
361-
},
362-
None::<fn() -> Element<'static, cosmic::Action<Message>>>,
363-
)),
364-
overlap_notify(id, true),
365-
])
360+
},
361+
None::<fn() -> Element<'static, cosmic::Action<Message>>>,
362+
))
366363
}
367364

368365
pub fn activate(&mut self) -> Task<Message> {
@@ -408,10 +405,6 @@ impl CosmicAppLibrary {
408405
}
409406

410407
fn handle_overlap(&mut self) -> Task<Message> {
411-
if !matches!(self.surface_state, SurfaceState::Visible) {
412-
return Task::none();
413-
}
414-
415408
let mid_height = self.size.height / 2.;
416409
self.margin = 0.;
417410

@@ -1222,7 +1215,11 @@ impl cosmic::Application for CosmicAppLibrary {
12221215
}
12231216
Message::Opened(size, window_id) => {
12241217
let mut tasks = Vec::new();
1225-
if self.dummy_id.is_none() {
1218+
if let Some(dummy) = self.dummy_id
1219+
&& window_id == dummy
1220+
{
1221+
tasks.push(overlap_notify(window_id, true));
1222+
} else if self.dummy_id.is_none() {
12261223
tasks.push(overlap_notify(SurfaceId::RESERVED, true));
12271224
}
12281225
if window_id == SurfaceId::RESERVED {
@@ -1247,11 +1244,11 @@ impl cosmic::Application for CosmicAppLibrary {
12471244
exclusive,
12481245
..
12491246
} => {
1250-
if self.needs_clear {
1251-
self.needs_clear = false;
1252-
self.overlap.clear();
1253-
}
12541247
if exclusive > 0 || namespace == "Dock" || namespace == "Panel" {
1248+
if self.needs_clear {
1249+
self.needs_clear = false;
1250+
self.overlap.clear();
1251+
}
12551252
self.overlap.insert(identifier, logical_rect);
12561253
}
12571254
return self.handle_overlap();

0 commit comments

Comments
 (0)