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.

Fix vertical dock host visibility and stale taskbar recovery

Atharv Tambolifc1a52ac3a2f
diff --git a/crates/rf-app/src/dock/mod.rs b/crates/rf-app/src/dock/mod.rs
index 0710012c..b5bb349f 100644
--- a/crates/rf-app/src/dock/mod.rs
+++ b/crates/rf-app/src/dock/mod.rs
@@ -54,6 +54,7 @@ mod grow_host;
mod grow_head;
mod grow_view;
mod host;
+pub(crate) use host::dock_edge;
mod hover_preview;
mod island_menu;
mod icon_levels;
diff --git a/crates/rf-app/src/shell/live.rs b/crates/rf-app/src/shell/live.rs
index 24bd7e10..f74f9a68 100644
--- a/crates/rf-app/src/shell/live.rs
+++ b/crates/rf-app/src/shell/live.rs
@@ -271,7 +271,7 @@ fn sync_work_area(cx: &App) {
}
let home = super::taskbar_hide::current_band().unwrap_or_else(|| band_thickness(cx));
let others = super::taskbar_hide::other_bands();
- let edge = crate::dock::host::dock_edge(cx);
+ let edge = crate::dock::dock_edge(cx);
let spawned = std::thread::Builder::new().name("rf-workarea-sync".into()).spawn(move || {
let mut g = WORK.lock().unwrap_or_else(|p| p.into_inner());
// (the monitors are looked at with the lock held: a thread that looked before waiting for the one ahead of it had the work
diff --git a/crates/rf-app/src/shell/taskbar_hide.rs b/crates/rf-app/src/shell/taskbar_hide.rs
index ef616db1..ed289f6e 100644
--- a/crates/rf-app/src/shell/taskbar_hide.rs
+++ b/crates/rf-app/src/shell/taskbar_hide.rs
@@ -58,7 +58,7 @@ pub(super) fn other_bands() -> Vec<(String, i32)> {
/// The dock reserves `band` px at the bottom of the primary monitor (device px), or none (`None`: `dock_reserve` is off). Costs a lock
/// and a comparison when nothing changed and nothing is running; with the hide in force the work area follows.
pub fn band_changed(band: Option<i32>, cx: &App) {
- let edge = crate::dock::host::dock_edge(cx);
+ let edge = crate::dock::dock_edge(cx);
let changed = {
let mut last = EDGE.lock().unwrap_or_else(|p| p.into_inner());
let changed = *last != edge;
@@ -161,7 +161,7 @@ fn stale_check() {
}
log::warn!("taskbar hiding: the setting is off but an earlier run left a record of hidden windows; undoing it");
let cfg = Config { state_dir: dir, guard_exe: taskbar_hide::guard_next_to_exe(), band_px: None, band_known: false };
- match TaskbarHider::start_on(cfg, crate::dock::host::dock_edge(cx)) {
+ match TaskbarHider::start(cfg) {
Ok(hider) => hider.finish(Duration::from_secs(10)),
Err(e) => log::warn!("taskbar hiding: the earlier run's record could not be undone: {e}"),
}
@@ -185,7 +185,7 @@ fn start(cx: &mut App) {
let dir = state_dir.clone();
let _ = std::thread::Builder::new().name("taskbar-autohide".into()).spawn(move || rf_win::taskbar_autohide::engage(&dir));
let cfg = Config { state_dir, guard_exe: taskbar_hide::guard_next_to_exe(), band_px: band.flatten(), band_known: band.is_some() };
- match TaskbarHider::start_on(cfg, crate::dock::host::dock_edge(cx)) {
+ match TaskbarHider::start_on(cfg, crate::dock::dock_edge(cx)) {
Ok(hider) => {
hider.set_wanted(true);
let others = OTHER_BANDS.lock().unwrap_or_else(|p| p.into_inner()).clone();