Skip to content

A fast file manager for Windows and macOS that never freezes: tabs, dual panes, archives as folders, Quick Look-style previews. A File Explorer and Finder alternative written in Rust.

A taskbar hidden a moment late is taken on as the dock's: no gap above the dock after an update

gelenmedya86a237391182
diff --git a/crates/rf-app/src/status_center.rs b/crates/rf-app/src/status_center.rs
index 066791cc..28eeff11 100644
--- a/crates/rf-app/src/status_center.rs
+++ b/crates/rf-app/src/status_center.rs
@@ -1718,7 +1718,7 @@ pub fn render_flyout(ops: &Entity<Ops>, p: &Palette, top: Pixels, cx: &App) -> O
.bg(p.card_bg)
.border_1()
.border_color(p.border)
- .shadow_lg()
+ .shadow_lg().occlude()
.on_mouse_down(MouseButton::Left, |_, _, cx| cx.stop_propagation())
.child(
h_flex()
@@ -2555,6 +2555,8 @@ pub fn update_toast(p: &Palette, picker: bool) -> Option<AnyElement> {
.border_color(edge)
.when(important, |d| d.border_2())
.shadow_lg()
+ // the pointer on the card is not on the row under it: no hover, no hover details from the list behind (user, 2026-12-04)
+ .occlude()
.on_mouse_down(MouseButton::Left, |_, _, cx| cx.stop_propagation())
.child(Icon::new(sign).size(px(16.)).text_color(edge))
.child(
diff --git a/crates/rf-shellguard/src/tbctl.rs b/crates/rf-shellguard/src/tbctl.rs
index 49a9ce72..56697000 100644
--- a/crates/rf-shellguard/src/tbctl.rs
+++ b/crates/rf-shellguard/src/tbctl.rs
@@ -141,6 +141,11 @@ pub struct Controller {
hidden: Vec<Target>,
/// Their rectangles, for the work-area rule.
bars: Vec<[i32; 4]>,
+ /// Windows asked to hide that were still visible when the hide was waited for, with their rectangle then. One that is hidden at a
+ /// later look was hidden by us after all and is taken on as ours: during an update the old dock's restore still showed the taskbar
+ /// while the new dock hid it, the hide landed a moment late, and the window was never counted as ours, so its strip stayed
+ /// reserved above the dock's band (a gap above the dock after updating to 1.0.9).
+ late: Vec<(Target, [i32; 4])>,
refusal: Option<Refusal>,
guard_failures: usize,
next_guard_try_ms: u64,
@@ -189,6 +194,7 @@ impl Controller {
guard: GuardStatus::Absent,
hidden: Vec::new(),
bars: Vec::new(),
+ late: Vec::new(),
refusal: None,
guard_failures: 0,
next_guard_try_ms: 0,
@@ -473,6 +479,7 @@ impl Controller {
}
};
self.refresh_bars(&live);
+ self.adopt_late_hides(w, &live);
let to_hide = tbmodel::windows_to_hide(&live);
if to_hide.is_empty() {
if self.hidden.is_empty() {
@@ -547,6 +554,34 @@ impl Controller {
self.guard_failures += 1;
}
+ /// Windows of [`Controller::late`] that are hidden now are ours (see there); visible ones are asked again by the next pass, gone or
+ /// changed ones are forgotten.
+ fn adopt_late_hides(&mut self, w: &mut dyn HideWorld, live: &[LiveWindow]) {
+ if self.late.is_empty() {
+ return;
+ }
+ let mut adopted = 0;
+ for (t, rect) in std::mem::take(&mut self.late) {
+ match live.iter().find(|l| l.handle == t.handle && l.pid == t.pid && l.start == t.start) {
+ Some(l) if !l.visible => {
+ if !self.hidden.iter().any(|h| h.handle == t.handle) {
+ self.hidden.push(t.clone());
+ }
+ if !self.bars.contains(&rect) {
+ self.bars.push(rect);
+ }
+ adopted += 1;
+ }
+ Some(_) => self.late.push((t, rect)),
+ None => {}
+ }
+ }
+ if adopted > 0 {
+ self.refusal = None;
+ w.log(&format!("taskbar: {adopted} taskbar window(s) hidden a moment late are taken on as ours"));
+ }
+ }
+
fn hide_pass(&mut self, w: &mut dyn HideWorld, live: &[LiveWindow], to_hide: Vec<Target>) {
// The record first: it must be on disk before any window is hidden.
let now = w.now_ms();
@@ -594,6 +629,12 @@ impl Controller {
}
if !still_visible.is_empty() {
w.warn(&format!("taskbar: {} window(s) were asked to hide but are still visible; nothing else is changed for them", still_visible.len()));
+ for t in &still_visible {
+ if let Some(l) = live.iter().find(|l| l.handle == t.handle) {
+ self.late.retain(|(x, _)| x.handle != t.handle);
+ self.late.push((t.clone(), l.rect));
+ }
+ }
}
if done > 0 {
self.refusal = None;
diff --git a/crates/rf-shellguard/src/tbctl_tests.rs b/crates/rf-shellguard/src/tbctl_tests.rs
index 0a005db8..8e0084fa 100644
--- a/crates/rf-shellguard/src/tbctl_tests.rs
+++ b/crates/rf-shellguard/src/tbctl_tests.rs
@@ -109,6 +109,21 @@ fn nothing_is_hidden_when_explorer_has_no_visible_taskbar_yet_and_a_later_tick_d
assert_eq!(c.status(), Status::Hidden(2));
}
+#[test]
+fn a_taskbar_hidden_only_after_the_wait_gave_up_is_taken_on_at_the_next_look() {
+ // during an update the old dock's restore still showed the taskbar while the new dock hid it: the hide landed late
+ let (mut c, mut w) = (ctl(), world());
+ w.hide_after_wait = vec![0x1001];
+ on(&mut c, &mut w);
+ assert_eq!(c.status(), Status::Hidden(1), "only the secondary was confirmed");
+ c.tick(&mut w);
+ assert_eq!(c.status(), Status::Hidden(2), "the primary, hidden by now, is ours too");
+ assert!(w.lines.iter().any(|l| l.contains("taken on as ours")), "{:?}", w.lines);
+ // and it is shown again with the other one when the dock lets go
+ c.set_wanted(&mut w, false);
+ assert_eq!(visible_handles(&w.desktop), vec![0x1001, 0x1002]);
+}
+
#[test]
fn a_taskbar_that_was_already_hidden_by_something_else_is_not_ours_to_show() {
let (mut c, mut w) = (ctl(), world());
diff --git a/crates/rf-shellguard/src/tbfakes.rs b/crates/rf-shellguard/src/tbfakes.rs
index 8a9bda52..4a319c58 100644
--- a/crates/rf-shellguard/src/tbfakes.rs
+++ b/crates/rf-shellguard/src/tbfakes.rs
@@ -61,6 +61,10 @@ pub struct FakeWorld {
/// Windows whose `hide` is accepted and takes effect only at the next `wait_hidden` (a moment later).
pub hide_late: Vec<isize>,
queued_hides: Vec<Target>,
+ /// Windows whose `hide` takes effect only after the wait for it gave up: they are hidden at the next look (Explorer was busy
+ /// showing them for another dock's restore).
+ pub hide_after_wait: Vec<isize>,
+ queued_after_wait: Vec<Target>,
/// What the dock was last told its band is (`None`: it was not told, or it was given back).
pub dock_edge: Option<[i32; 4]>,
/// How many `dock_edge_ready` looks answer "not yet" after the dock was told, before it has let go.
@@ -109,6 +113,8 @@ impl FakeWorld {
queued_shows: vec![],
hide_lost: vec![],
hide_late: vec![],
+ hide_after_wait: vec![],
+ queued_after_wait: vec![],
queued_hides: vec![],
dock_edge: None,
dock_release_after: 0,
@@ -169,6 +175,9 @@ impl HideWorld for FakeWorld {
}
fn list_taskbars(&mut self) -> Result<Vec<LiveWindow>, String> {
self.calls.push("list".into());
+ for t in std::mem::take(&mut self.queued_after_wait) {
+ let _ = set_visible(&self.desktop, &t, false);
+ }
if self.list_fails { Err("cannot list".into()) } else { Ok(self.desktop.borrow().clone()) }
}
fn hide(&mut self, t: &Target) -> Result<(), String> {
@@ -180,6 +189,10 @@ impl HideWorld for FakeWorld {
if self.hide_lost.contains(&t.handle) {
return Ok(());
}
+ if self.hide_after_wait.contains(&t.handle) {
+ self.queued_after_wait.push(t.clone());
+ return Ok(());
+ }
if self.hide_late.contains(&t.handle) {
self.queued_hides.push(t.clone());
return Ok(());