A new style desktop shell for Windows 11: menu bar, Dock, Finder, Spotlight, Control Center and Liquid Glass, in native C++.
Rust
Menu bar reads the wallpaper color off the UI thread (issue #32); README: what's new for build-30
Eternity070628b054edfbf595
diff --git a/README.md b/README.mdindex 9cb4374..0600a9e 100644--- a/README.md+++ b/README.md@@ -100,18 +100,26 @@ themes).## Features-- **Menu bar** with the active app's real menus, the Apple menu, status icons and the system tray.+- **Menu bar** with the active app's real menus, the Apple menu, status icons and the system tray. Hidden tray icons+ open from a list that shows each app's icon and name. New: you can move the menu bar to the **bottom, beside the+ Dock** (System Settings > Control Center).- **Dock** with magnification, running indicators, stacks (Downloads), minimized windows and the Trash. Put it onthe **bottom, left or right**, hide it always or only when a window touches it (**smart hide**), and customizespacing, distance from the edge, corner rounding, glass color and opacity, labels, indicators and the divider.- **Change Icon…**: right-click an app in the Dock or Launchpad to use your own PNG/ICO (and restore the original).- **Genie** minimize animation drawn by the compositor, with smooth edges all the way into the Dock.-- **Finder** (file manager), **Spotlight** (search with Applications, Files, Actions and Clipboard modes),- **Control Center**, **Notification Center**, **Mission Control**, **Launchpad / Apps**, **Quick Look**,- **Stage Manager** and **Hot Corners**.-- **Mac title bars** (traffic lights, rounded corners, shadows) on other apps' windows. Chrome, Discord, Spotify and- other Chromium/Electron apps keep their own bar but get rounded corners and a Mac-style border that matches the- app's own light or dark look.+- **Finder** (file manager), **Spotlight**, **Control Center**, **Notification Center**, **Mission Control**,+ **Launchpad / Apps**, **Quick Look**, **Stage Manager** and **Hot Corners**.+- **Spotlight** searches apps, files, folders and the web, does math, and completes the best match as you type, with+ Applications, Files, Actions and Clipboard modes. New: it also finds **Windows settings and tools**+ ("device manager", "add or remove programs", services, display, Wi-Fi and about 200 Control Panel tasks), each+ with its own icon.+- **Mac title bars** (traffic lights, rounded corners, shadows) on other apps' windows, including GTK apps like+ GIMP 3. Chrome, Discord, Spotify and other Chromium/Electron apps keep their own bar but get rounded corners and a+ Mac-style border that matches the app's own light or dark look.+- **Mac buttons in Chrome, Discord and other Electron apps** (new, **experimental**, off by default): the traffic+ lights go into the app's own title bar, in place of the Windows buttons. Turn it on in System Settings > Desktop &+ Dock > "Mac buttons in apps with their own title bar". Feedback is welcome in the issues.- **macOS alerts** in place of Windows message boxes, and the Mac Open/Save panel through Finder.- **Built-in apps**: System Settings, Activity Monitor (with memory pressure), Terminal, Calculator, Notes,Reminders, Calendar, TextEdit, Preview, Photos, Music, QuickTime Player, Clock, Weather, Contacts,@@ -119,9 +127,11 @@ themes).- **Memory management like macOS**: memory pressure, App Nap and purgeable memory.- **Themes**: macOS 27 Golden Gate, macOS Tahoe, macOS Sequoia and Mac OS X Leopard.- **Dynamic Island** (optional, System Settings > Control Center): music, timers, notifications and volume in a pill- or a notch at the top of the screen.+ or a **notch** at the top of the screen, plus a **clipboard history** with your last 20 copies (text and files),+ kept across restarts and encrypted for your Windows user.- **Game Mode** like macOS: when a game comes to the front, WacOS turns off what costs the most (real glass, mouse- effects, Hot Corners, file indexing) until the game quits. System Settings > Energy.+ effects, Hot Corners, file indexing) until the game quits. Game launchers (Riot Client, EA app, Ubisoft Connect,+ Battle.net and others) don't count as games. System Settings > Energy.- **Launchpad**: hide any app (right-click > Hide from Launchpad), or all of Windows' system tools at once.- **Icon styles** (Default, Dark, Clear, Tinted), accent colors, light and dark appearance.- **Customize the desktop** (icon size, grid spacing, text size, widgets), **notifications** (banner duration,@@ -239,6 +249,10 @@ records what was changed, how it was checked and what wasn't. Some of the checks- **Title bars across updates:** the title bars load through a small fixed loader (`WacOSGancho.dll`), so updating orrestarting WacOS doesn't use up Windows' limited hook slots anymore; tested by swapping the title bar DLL threetimes in one sign-in.+- **Freeze hunting:** a sentinel thread writes the stack of any interface stall of 1 second or more to `shell.log`,+ and the shell and the title bar DLL never wait for the disk, the Registry or another process on a window's+ thread. On a busy disk this took freezes of several seconds in the shell and in apps like Discord and Chrome+ down to a few milliseconds.- **Reported bugs** from Reddit, GitHub and Discord are reproduced when possible (videos help a lot!).Known limits: apps running as administrator can't get the Mac title bar from a shell that isn't elevated, and thediff --git a/docs/registro-mudancas.txt b/docs/registro-mudancas.txtindex 1f38e92..e7f92a1 100644--- a/docs/registro-mudancas.txt+++ b/docs/registro-mudancas.txt@@ -1281,3 +1281,8 @@ Compilado (tudo), instalado, Shell e reserva do Finder reiniciados às 23:07 sem- src/shell/backdrop.cpp (PecasSemReal): com várias peças e sem o vidro real (modo jogo, VM, captura recusada) o fosco era um só, do tamanho da janela. Agora cada peça ganha fosco e tinta recortados nos cantos dela.Compilado e instalado (21:15, vidro real ligado). NÃO conferido na tela com o vidro real desligado (o usuário ia reiniciar o PC).DESFAZER: reverter o commit.++[2026-11-22 21:40, hora do PC] Barra de menus: cor do papel de parede lida numa thread (issue #32, achado da outra sessão) e README da build-30.+ - src/shell/menubar.cpp: com o Explorador de fundo, a cor do topo do papel de parede vinha do arquivo (Registro + GetFileAttributes) a cada desenho e a cada tique de 1 s; o sentinela pegou 11 s parado (20:49). Agora numa thread, no máximo a cada 4 s.+ - README.md: novidades (barra de menus embaixo, Spotlight com ajustes do Windows, ícones na lista da bandeja, botões do Mac nos apps Electron como experimental, histórico da área de transferência na Ilha, launchers fora do modo jogo, sentinela de travadas).+ DESFAZER: reverter o commit.diff --git a/src/shell/menubar.cpp b/src/shell/menubar.cppindex ab4021d..a5e6bc1 100644--- a/src/shell/menubar.cpp+++ b/src/shell/menubar.cpp@@ -630,9 +630,42 @@ bool WallpaperTopDark(bool fallback) {if (std::fabs(luma - lastLog) > 0.05) { lastLog = luma; Log(L"barra de menus: atrás dela claridade %.2f -> texto %ls", luma, dark ? L"branco" : L"preto"); }return dark;}+// O arquivo do papel de parede numa thread (issue #32): esta conta roda a cada desenho da barra e a cada tique de 1 s,+// e com o Explorador de fundo (o padrão, sem a nossa mesa para dar a cor) lia o Registro e perguntava ao disco pelo+// arquivo toda vez. Com o disco ocupado o GetFileAttributes segurou a interface 11 s (sentinela, 22/11/2026 20:49).+// Agora a interface usa o último resultado e pede uma leitura nova no máximo a cada 4 s.+bool LeTopoDoArquivo(bool fallback, float rgb[3]);+void Render();bool WallpaperTopDarkFile(bool fallback) {+ static std::atomic<bool> rodando{ false };+ static DWORD quando = 0;+ static int escuro = -1; // -1: ainda sem leitura+ DWORD agora = GetTickCount();+ if (!rodando && (!quando || agora - quando > 4000)) {+ quando = agora;+ rodando = true;+ std::thread([fallback] {+ HRESULT ci = CoInitializeEx(nullptr, COINIT_MULTITHREADED); // WIC+ float rgb[3] = { -1, -1, -1 };+ bool d = LeTopoDoArquivo(fallback, rgb);+ if (SUCCEEDED(ci)) CoUninitialize();+ shell::NaInterface([d, r = rgb[0], g = rgb[1], b = rgb[2]] {+ rodando = false;+ bool mudou = escuro != (d ? 1 : 0);+ escuro = d ? 1 : 0;+ if (r >= 0 && (r != g_topR || g != g_topG || b != g_topB)) { g_topR = r; g_topG = g; g_topB = b; mudou = true; }+ if (mudou) Render();+ });+ }).detach();+ }+ return escuro < 0 ? fallback : escuro == 1;+}+// roda numa thread (só uma por vez): rgb sai com a cor média do topo, ou fica como veio se não leu+bool LeTopoDoArquivo(bool fallback, float rgb[3]) {static std::wstring lastKey;static bool lastDark = true;+ static float lastRGB[3] = { -1, -1, -1 };+ struct Sai { float* o; ~Sai() { if (lastRGB[0] >= 0) for (int i = 0; i < 3; i++) o[i] = lastRGB[i]; } } sai{ rgb };// o papel de parede que a mesa desenha (do registro); sem ele, o do Windowswchar_t path[MAX_PATH] = {};DWORD cb = sizeof(path);@@ -667,7 +700,7 @@ bool WallpaperTopDarkFile(bool fallback) {sb += px[i * 4] / 255.0; sg += px[i * 4 + 1] / 255.0; sr += px[i * 4 + 2] / 255.0;}double luma = sum / (W * 3);- g_topR = (float)(sr / (W * 3)); g_topG = (float)(sg / (W * 3)); g_topB = (float)(sb / (W * 3));+ lastRGB[0] = (float)(sr / (W * 3)); lastRGB[1] = (float)(sg / (W * 3)); lastRGB[2] = (float)(sb / (W * 3));// Tahoe: adaptação com histerese do vidro do macOS 26 (glassLumaHysteresisRange, guia seção 2.1): acima de// 0,60 vira texto escuro, abaixo de 0,40 texto claro, entre os dois fica como estava. Sequoia: limiar 0,72.static int adapt = -1; // -1 ainda não decidido, 0 texto claro, 1 texto escuro