Skip to content

A lightweight, macOS-style dock for Windows 11, with glass visuals, smooth magnification, and Genie effect.

feat: update changelog and README for Alt+Tab improvements and automatic update details

CristianOlivera1c9f3881d4639
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2dbce6b..5d39a3d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,9 @@ copia la sección de la versión que se publica a la release de GitHub.
- Fixed: after choosing an item in the dock's menu (Muelle Settings, for
one), the dock could stay magnified and stop reacting to the pointer.
+- Alt+Tab: the hidden dock shows only for Alt+Tab, no longer for Task View,
+ whose virtual desktops it covered at the bottom of the screen; and it no
+ longer flashes for a moment after cancelling Alt+Tab with Esc.
- Alt+Tab: moving the mouse or clicking an empty spot no longer stops the
dock's magnifier from following the selection, and closing a window from
the switcher keeps it on the right app. Only the arrow keys, which move the
@@ -30,6 +33,9 @@ copia la sección de la versión que se publica a la release de GitHub.
- Corregido: tras elegir una opción del menú del dock (por ejemplo, Ajustes
de Muelle), el dock podía quedarse ampliado y dejar de responder al puntero.
+- Alt+Tab: el dock oculto aparece solo con Alt+Tab, ya no con la Vista de
+ tareas, cuyos escritorios virtuales tapaba abajo; y ya no parpadea un
+ momento después de cancelar Alt+Tab con Esc.
- Alt+Tab: mover el ratón o hacer clic en un hueco ya no impide que la lupa
del dock siga la selección, y cerrar una ventana desde el selector la
mantiene en la app correcta. Solo las flechas, que mueven la selección de
diff --git a/README.es.md b/README.es.md
index dcf7cb9..6427020 100644
--- a/README.es.md
+++ b/README.es.md
@@ -132,8 +132,11 @@ pnpm build
Muelle no recoge datos, no tiene telemetría y nunca envía nada al proyecto. Hace
dos tipos de conexión de red, ambas opcionales:
-- **Búsqueda de actualizaciones:** Ajustes pregunta a GitHub Releases si hay una
- versión nueva al abrirse. Se desactiva en Ajustes → Sistema → *Buscar
+- **Actualizaciones:** Ajustes pregunta a GitHub Releases si hay una versión
+ nueva al abrirse y, una vez al día, un par de minutos después de encender el
+ ordenador, Muelle hace lo mismo en segundo plano e instala lo que encuentre
+ (el dock en sí nunca usa la red). La instalación se desactiva en Ajustes →
+ Sistema → *Instalar actualizaciones automáticamente*, y todo con *Buscar
actualizaciones automáticamente*.
- **Uso de proveedores de IA:** mientras un cliente compatible está abierto,
Muelle reutiliza su sesión local para consultar los límites disponibles de
diff --git a/README.md b/README.md
index 1b6b353..f4f6931 100644
--- a/README.md
+++ b/README.md
@@ -133,8 +133,12 @@ pnpm build
Muelle collects no data, has no telemetry and never sends anything to the
project. It makes two kinds of network requests, both optional:
-- **Update check:** Settings asks GitHub Releases for a newer version when it
- opens. Turn it off in Settings → System → *Check for updates automatically*.
+- **Updates:** Settings asks GitHub Releases for a newer version when it
+ opens, and once a day, a couple of minutes after you turn on the computer,
+ Muelle does the same in the background and installs what it finds (the dock
+ itself never uses the network). Turn off the installing in Settings → System
+ → *Install updates automatically*, or everything with *Check for updates
+ automatically*.
- **AI provider usage:** while a supported client is running, Muelle reads its
existing local sign-in and asks that provider for available plan limits
every five minutes while visible, or when you press Refresh. For Gemini CLI
diff --git a/apps/dock/src/app.rs b/apps/dock/src/app.rs
index 851b266..918c87e 100644
--- a/apps/dock/src/app.rs
+++ b/apps/dock/src/app.rs
@@ -201,6 +201,8 @@ const SWITCHER_TIMER: usize = 9;
const SWITCHER_POLL_MS: u32 = 16;
/// How long the switcher may take to show after coming to the front.
const SWITCHER_APPEAR: std::time::Duration = std::time::Duration::from_millis(400);
+/// How soon after closing the switcher's window coming back means nothing.
+const SWITCHER_ECHO: std::time::Duration = std::time::Duration::from_millis(150);
/// Recheck full-screen state while hidden in case Windows drops the exit event.
const FULLSCREEN_TIMER: usize = 10;
const FULLSCREEN_RECHECK_MS: u32 = 3_000;
@@ -423,6 +425,22 @@ struct StageKey {
entries: Vec<Entry>,
}
+/// Where the switcher's selection lands once the windows marked `false` in
+/// `alive` close: it stays at the same place in the list (the next window
+/// takes the closed one's place), or on the new last one. `None` if none is
+/// left.
+fn selection_after_closing(index: usize, alive: &[bool]) -> Option<usize> {
+ let left = alive.iter().filter(|&&on| on).count();
+ if left == 0 {
+ return None;
+ }
+ let closed_before = alive[..index.min(alive.len())]
+ .iter()
+ .filter(|&&on| !on)
+ .count();
+ Some((index - closed_before).min(left - 1))
+}
+
/// Where the Alt+Tab selection is believed to be.
struct SwitcherFollow {
/// The windows the switcher lists, in its order.
@@ -492,8 +510,11 @@ struct App {
/// The Alt+Tab switcher is open; an auto-hidden dock shows meanwhile.
switching: bool,
switch_started: Instant,
+ switch_ended: Option<Instant>,
/// When the dock started (the update waits a little after it).
launched: Instant,
+ /// When this dock last started a background update.
+ update_tried: Option<Instant>,
/// The selection in the switcher, as far as it can be followed.
follow: Option<SwitcherFollow>,
/// The magnifier rests on the icon selected in Alt+Tab, not the pointer.
@@ -1328,7 +1349,13 @@ impl App {
// bottom edge, where the dock would cover them.
// SAFETY: Read-only keyboard state query.
let alt = unsafe { GetAsyncKeyState(i32::from(VK_MENU.0)) < 0 };
- if self.switching || !alt {
+ // After it closes, Windows sometimes hands the focus back to the
+ // switcher's hidden window for a moment: not a new Alt+Tab.
+ let echo = self
+ .switch_ended
+ .is_some_and(|ended| ended.elapsed() < SWITCHER_ECHO)
+ && tracker::task_switcher_state() != Some(true);
+ if self.switching || !alt || echo {
return Ok(());
}
self.switching = true;
@@ -1359,6 +1386,7 @@ impl App {
return self.follow_selection();
}
self.switching = false;
+ self.switch_ended = Some(Instant::now());
// SAFETY: Our own timer.
unsafe {
let _ = KillTimer(Some(self.input), SWITCHER_TIMER);
@@ -1455,19 +1483,16 @@ impl App {
}
})
.collect();
- let removed_before = alive[..index.min(before)].iter().filter(|&&on| !on).count();
let mut position = 0;
follow.order.retain(|_| {
position += 1;
alive[position - 1]
});
let closed = follow.order.len() != before;
- if follow.order.is_empty() {
+ let Some(selected) = selection_after_closing(index, &alive) else {
return self.stop_following();
- }
- if closed {
- follow.index = (index - removed_before).min(follow.order.len() - 1);
- }
+ };
+ follow.index = selected;
let tab = down(VK_TAB);
let pressed = tab && !follow.tab_down;
follow.tab_down = tab;
@@ -1549,8 +1574,17 @@ impl App {
let _ = KillTimer(Some(self.input), UPDATE_TIMER);
return;
}
+ // Also counted from the last try in this session: if the date
+ // could not be saved, the registry would call it due again at
+ // once, and the dock would start one update after another.
+ let since_try = self
+ .update_tried
+ .map_or(std::time::Duration::ZERO, |tried| {
+ UPDATE_EVERY.saturating_sub(tried.elapsed())
+ });
let wait = muelle_shell::updates::due_in(UPDATE_EVERY)
- .max(UPDATE_AFTER_START.saturating_sub(self.launched.elapsed()));
+ .max(UPDATE_AFTER_START.saturating_sub(self.launched.elapsed()))
+ .max(since_try);
SetTimer(Some(self.input), UPDATE_TIMER, millis(wait), None);
}
}
@@ -1574,6 +1608,7 @@ impl App {
}
// Recorded first: whatever happens, the next look is tomorrow.
muelle_shell::updates::mark_checked();
+ self.update_tried = Some(Instant::now());
self.schedule_update();
let settings = env::current_exe()
.ok()
@@ -3180,7 +3215,9 @@ pub fn run() -> Result<()> {
spring: None,
switching: false,
switch_started: Instant::now(),
+ switch_ended: None,
launched: Instant::now(),
+ update_tried: None,
follow: None,
pointed: false,
pending_drop: None,
@@ -3344,3 +3381,24 @@ mod performance_tests {
assert!(gate.request());
}
}
+
+#[cfg(test)]
+mod switcher_tests {
+ use super::selection_after_closing;
+
+ #[test]
+ fn selection_after_closing_should_keep_its_place_in_the_list() {
+ // Nothing closed.
+ assert_eq!(selection_after_closing(1, &[true, true, true]), Some(1));
+ // A window before the selection closes: the selection moves up one.
+ assert_eq!(selection_after_closing(2, &[true, false, true]), Some(1));
+ // A window after it closes: nothing moves.
+ assert_eq!(selection_after_closing(0, &[true, true, false]), Some(0));
+ // The selected window closes: the next one takes its place.
+ assert_eq!(selection_after_closing(1, &[true, false, true]), Some(1));
+ // The selected window was the last: the new last one.
+ assert_eq!(selection_after_closing(2, &[true, true, false]), Some(1));
+ // Everything closed.
+ assert_eq!(selection_after_closing(0, &[false, false]), None);
+ }
+}
diff --git a/muelle/src/pages/privacy.astro b/muelle/src/pages/privacy.astro
index 51c9474..ae76ef8 100644
--- a/muelle/src/pages/privacy.astro
+++ b/muelle/src/pages/privacy.astro
@@ -7,7 +7,7 @@ import { site } from "@/data/site";
<PolicyPage
title="Privacy policy"
description="Muelle has no accounts, analytics or telemetry. Its optional network requests check for updates and read AI provider usage."
- updated="November 15, 2026"
+ updated="November 16, 2026"
>
<p>
Muelle has no accounts, no analytics and no telemetry. It does not collect personal data and never sends anything
@@ -66,7 +66,7 @@ import { site } from "@/data/site";
</ul>
<p>
To show what is on screen (open windows, their icons, network and volume status, and whether an app is using the
- microphone, camera or location, for the menu bar), Muelle asks Windows itself; none of it leaves your computer. Uninstalling removes the cache, and optionally your settings.
+ microphone or camera, for the menu bar), Muelle asks Windows itself; none of it leaves your computer. Uninstalling removes the cache, and optionally your settings.
</p>
<h2>This website</h2>
diff --git a/spikes/src/bin/spike_menu.rs b/spikes/src/bin/spike_menu.rs
index 97396f2..0b1dea0 100644
--- a/spikes/src/bin/spike_menu.rs
+++ b/spikes/src/bin/spike_menu.rs
@@ -95,38 +95,68 @@ fn main() -> anyhow::Result<()> {
menu::MenuItem::Separator,
menu::MenuItem::action(5, "&Salir de Muelle"),
];
+ let scenario = std::env::args().nth(3).unwrap_or_default();
std::thread::spawn(move || {
- std::thread::sleep(Duration::from_millis(120));
+ use windows::Win32::UI::WindowsAndMessaging::{
+ WM_KEYDOWN, WM_LBUTTONDOWN, WM_LBUTTONUP, WM_MOUSEMOVE,
+ };
+ std::thread::sleep(Duration::from_millis(150));
let Ok(menu) = FindWindowW(w!("MuelleMenu"), None) else {
return;
};
- // Two "down" keys: the selection lands on the second item.
- for _ in 0..2 {
- let _ = PostMessageW(
- Some(menu),
- windows::Win32::UI::WindowsAndMessaging::WM_KEYDOWN,
- WPARAM(0x28),
- LPARAM(0),
- );
- }
- std::thread::sleep(Duration::from_millis(100));
- let mut rect = RECT::default();
- let _ = GetWindowRect(menu, &mut rect);
- let pad = 24;
- let area = RECT {
- left: rect.left - pad,
- top: rect.top - pad,
- right: rect.right + pad,
- bottom: rect.bottom + pad,
+ let at = |y: i32| LPARAM(((y as u32 & 0xFFFF) << 16 | 40) as isize);
+ let post = |msg: u32, w: usize, l: LPARAM| {
+ let _ = PostMessageW(Some(menu), msg, WPARAM(w), l);
};
- if let Some(shot) = screen::capture(area)
- && let Ok(mut file) = std::fs::File::create(&out)
- {
- let _ = file.write_all(&((area.right - area.left) as u32).to_le_bytes());
- let _ = file.write_all(&((area.bottom - area.top) as u32).to_le_bytes());
- let _ = file.write_all(&shot.bgra);
+ if scenario.is_empty() {
+ std::thread::sleep(Duration::from_millis(70));
+ let mut rect = RECT::default();
+ let _ = GetWindowRect(menu, &mut rect);
+ let pad = 24;
+ let area = RECT {
+ left: rect.left - pad,
+ top: rect.top - pad,
+ right: rect.right + pad,
+ bottom: rect.bottom + pad,
+ };
+ if let Some(shot) = screen::capture(area)
+ && let Ok(mut file) = std::fs::File::create(&out)
+ {
+ let _ = file.write_all(&((area.right - area.left) as u32).to_le_bytes());
+ let _ = file.write_all(&((area.bottom - area.top) as u32).to_le_bytes());
+ let _ = file.write_all(&shot.bgra);
+ }
+ post(WM_CANCELMODE, 0, LPARAM(0));
+ return;
+ }
+ // Past the delay that ignores the release of the opening click.
+ std::thread::sleep(Duration::from_millis(350));
+ match scenario.as_str() {
+ "A" => {
+ post(WM_MOUSEMOVE, 0, at(50));
+ post(WM_LBUTTONDOWN, 1, at(50));
+ post(WM_LBUTTONUP, 0, at(50));
+ }
+ "B" => {
+ post(WM_MOUSEMOVE, 0, at(110));
+ post(WM_LBUTTONDOWN, 1, at(110));
+ post(WM_LBUTTONUP, 0, at(110));
+ std::thread::sleep(Duration::from_millis(200));
+ post(WM_KEYDOWN, 0x1B, LPARAM(0));
+ }
+ "C" => post(WM_KEYDOWN, 0x53, LPARAM(0)),
+ "D" => post(WM_LBUTTONDOWN, 1, LPARAM(((5u32 << 16) | 0xFFEC) as isize)),
+ "E" => {
+ for _ in 0..4 {
+ post(WM_KEYDOWN, 0x28, LPARAM(0));
+ }
+ post(WM_KEYDOWN, 0x0D, LPARAM(0));
+ }
+ _ => post(WM_CANCELMODE, 0, LPARAM(0)),
}
- let _ = PostMessageW(Some(menu), WM_CANCELMODE, WPARAM(0), LPARAM(0));
+ // Never leave a test menu open.
+ std::thread::sleep(Duration::from_millis(1500));
+ post(WM_CANCELMODE, 0, LPARAM(0));
});
let chosen = menu::show(&gfx, owner, &items, POINT { x: 960, y: 980 }, dark);
println!("chosen: {chosen:?}");
diff --git a/spikes/src/bin/spike_verbs.rs b/spikes/src/bin/spike_verbs.rs
index 3420f68..aa1823d 100644
--- a/spikes/src/bin/spike_verbs.rs
+++ b/spikes/src/bin/spike_verbs.rs
@@ -7,7 +7,10 @@ use windows::{
Win32::{
System::Com::{COINIT_APARTMENTTHREADED, CoInitializeEx},
UI::{
- Shell::{BHID_SFUIObject, CMF_NORMAL, GCS_VERBW, IContextMenu, IShellItem, SHCreateItemFromParsingName},
+ Shell::{
+ BHID_SFUIObject, CMF_NORMAL, GCS_VERBW, IContextMenu, IShellItem,
+ SHCreateItemFromParsingName,
+ },
WindowsAndMessaging::{CreatePopupMenu, DestroyMenu, GetMenuItemCount, GetMenuItemID},
},
},
@@ -17,17 +20,40 @@ use windows::{
fn verbs(path: &str) -> Vec<String> {
let mut out = Vec::new();
unsafe {
- let Ok(item) = SHCreateItemFromParsingName::<_, _, IShellItem>(&HSTRING::from(path), None) else { return vec!["(no item)".into()] };
- let Ok(menu) = item.BindToHandler::<_, IContextMenu>(None, &BHID_SFUIObject) else { return vec!["(no menu)".into()] };
- let Ok(popup) = CreatePopupMenu() else { return out };
- if menu.QueryContextMenu(popup, 0, 1, 0x7FFF, CMF_NORMAL).is_ok() {
+ let Ok(item) = SHCreateItemFromParsingName::<_, _, IShellItem>(&HSTRING::from(path), None)
+ else {
+ return vec!["(no item)".into()];
+ };
+ let Ok(menu) = item.BindToHandler::<_, IContextMenu>(None, &BHID_SFUIObject) else {
+ return vec!["(no menu)".into()];
+ };
+ let Ok(popup) = CreatePopupMenu() else {
+ return out;
+ };
+ if menu
+ .QueryContextMenu(popup, 0, 1, 0x7FFF, CMF_NORMAL)
+ .is_ok()
+ {
for position in 0..GetMenuItemCount(Some(popup)).max(0) {
let command = GetMenuItemID(popup, position);
- if command == u32::MAX || command == 0 { continue; }
+ if command == u32::MAX || command == 0 {
+ continue;
+ }
let mut name = [0u16; 64];
- if menu.GetCommandString((command - 1) as usize, GCS_VERBW, None, PSTR(name.as_mut_ptr().cast()), name.len() as u32).is_ok() {
+ if menu
+ .GetCommandString(
+ (command - 1) as usize,
+ GCS_VERBW,
+ None,
+ PSTR(name.as_mut_ptr().cast()),
+ name.len() as u32,
+ )
+ .is_ok()
+ {
let len = name.iter().position(|&u| u == 0).unwrap_or(0);
- if len > 0 { out.push(String::from_utf16_lossy(&name[..len])); }
+ if len > 0 {
+ out.push(String::from_utf16_lossy(&name[..len]));
+ }
}
}
}
@@ -37,14 +63,23 @@ fn verbs(path: &str) -> Vec<String> {
}
fn main() {
- unsafe { let _ = CoInitializeEx(None, COINIT_APARTMENTTHREADED); }
+ unsafe {
+ let _ = CoInitializeEx(None, COINIT_APARTMENTTHREADED);
+ }
let folder = PathBuf::from(env::var("APPDATA").unwrap_or_default())
.join(r"Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar");
for entry in fs::read_dir(folder).into_iter().flatten().flatten() {
let path = entry.path().to_string_lossy().into_owned();
- println!("{} -> {:?}", entry.file_name().to_string_lossy(), verbs(&path));
+ println!(
+ "{} -> {:?}",
+ entry.file_name().to_string_lossy(),
+ verbs(&path)
+ );
}
- for id in muelle_shell::pins::taskbar_pins().iter().filter(|id| id.starts_with("shell:")) {
+ for id in muelle_shell::pins::taskbar_pins()
+ .iter()
+ .filter(|id| id.starts_with("shell:"))
+ {
println!("{id} -> {:?}", verbs(id));
}
}