A new style desktop shell for Windows 11: menu bar, Dock, Finder, Spotlight, Control Center and Liquid Glass, in native C++.
Rust
Discord requests: custom Launchpad icon, rename apps (Dock, Launchpad, menu bar), per-app volume in the Sound menu
Eternity070628be078715f70b
diff --git a/docs/registro-mudancas.txt b/docs/registro-mudancas.txtindex feee807..ba4155a 100644--- a/docs/registro-mudancas.txt+++ b/docs/registro-mudancas.txt@@ -1844,3 +1844,15 @@ Compilado (tudo), instalado, Shell e reserva do Finder reiniciados às 23:07 sem- README: seção "Siri with AI" e a demo (docs\screenshots\siri-demo.gif/.mp4, só o painel). O commit com a gravaçãoda mesa inteira foi tirado do histórico do main (force push com a proteção liberada e religada a pedido do usuário).DESFAZER: reverter o commit e rodar build.cmd shell.+[2026-11-24 15:45] Pedidos do canal #feature-requests do Discord:+ - Ícone do Launchpad (IggY): dock.cpp, botão direito no Launchpad do Dock > Opções > Alterar Ícone… / Restaurar Ícone+ Original / Remover do Dock (o mesmo ícone próprio dos apps: icones-dock\Launchpad.png); Abrir.+ - Renomear apps (Becky Prim): Dock e Launchpad > Renomear… abre os Ajustes (--pagina="renomear:<nome>|<chaves>") com a+ folha de texto preenchida; o nome vai para %APPDATA%\Shell\nomes-apps.txt ("chave<TAB>nome", as chaves do ícone+ próprio). apps::NomeVisivel relê o arquivo se mudou (no máximo 1x/s) e vale no Dock, no Launchpad e na barra de menus.+ Vazio volta ao original.+ - Mixer de volume (^ ^): som.cpp, o menu Som ganha a seção "Apps" com um controle por app que está tocando som (sessões+ de áudio da saída padrão juntas por .exe, até 8, sem os sons do sistema); atualiza a cada 0,5 s.+ - Não feitos: tela de bloqueio (já respondido na thread) e os ícones do macOS 27 (Google Drive de terceiros).+ Compilado e o Shell novo instalado e aberto sem erro; os menus e a folha não foram abertos na tela (sem clique simulado).+ DESFAZER: reverter o commit, build.cmd e copiar de novo; apagar %APPDATA%\Shell\nomes-apps.txt.diff --git a/src/ajustes/main.cpp b/src/ajustes/main.cppindex f54126b..01c1177 100644--- a/src/ajustes/main.cpp+++ b/src/ajustes/main.cpp@@ -27,6 +27,10 @@ static void LiberaFrente() {keybd_event(VK_MENU, 0, 0, 0); keybd_event(0xE8, 0, 0, 0); keybd_event(0xE8, 0, KEYEVENTF_KEYUP, 0); keybd_event(VK_MENU, 0, KEYEVENTF_KEYUP, 0);}+// a folha com campo de texto (mais abaixo, fora do namespace)+void AskText(const std::wstring& title, const std::wstring& message, const std::wstring& okLabel, bool password,+ std::function<void(const std::wstring&)> ok, const std::wstring& prefill);+namespace {// ---- Medidas (pt), tiradas da referência@@ -2043,6 +2047,7 @@ void LigaRelogio(HWND h) {}).detach();}+bool PedidoRenomear(const std::wstring& id); // Renomear… do Dock e do Launchpad (mais abaixo)LRESULT CALLBACK WndProc(HWND h, UINT m, WPARAM w, LPARAM l) {if (m == WM_QUADRO) {g_quadroPendente = false;@@ -2260,7 +2265,8 @@ LRESULT CALLBACK WndProc(HWND h, UINT m, WPARAM w, LPARAM l) {if (cd->dwData == 0x414A5354 && cd->cbData) {std::wstring id((const wchar_t*)cd->lpData, cd->cbData / sizeof(wchar_t));int i = SidebarIndexFor(id);- if (i >= 0) SelectSide(i);+ if (PedidoRenomear(id)) {}+ else if (i >= 0) SelectSide(i);else if (id == L"atualizacao") { int g = SidebarIndexFor(L"geral"); if (g >= 0) SelectSide(g); OpenUpdatePage(); }}if (IsIconic(h)) ShowWindow(h, SW_RESTORE);@@ -2292,6 +2298,53 @@ LRESULT CALLBACK WndProc(HWND h, UINT m, WPARAM w, LPARAM l) {return DefWindowProcW(h, m, w, l);}+// Renomear um app (pedido no Discord, 24/11/2026): o Dock e o Launchpad abrem os Ajustes com+// --pagina="renomear:<nome atual>|<chave>|<chave>..." (as chaves do ícone próprio: o .exe e o nome original). A folha+// de texto vem preenchida; o nome novo vai para %APPDATA%\Shell\nomes-apps.txt ("chave<TAB>nome"), que o Shell relê+// sozinho. Vazio = volta ao nome original.+bool PedidoRenomear(const std::wstring& id) {+ if (id.rfind(L"renomear:", 0) != 0) return false;+ std::vector<std::wstring> p;+ for (size_t a = 9;;) { size_t b = id.find(L'|', a); p.push_back(id.substr(a, b == std::wstring::npos ? b : b - a)); if (b == std::wstring::npos) break; a = b + 1; }+ if (p.size() < 2) return true;+ std::wstring atual = p[0];+ std::vector<std::wstring> chaves(p.begin() + 1, p.end());+ if (int d = SidebarIndexFor(L"dock"); d >= 0) SelectSide(d);+ ::AskText(std::wstring(Tr(L"Renomear")) + L" “" + atual + L"”", Tr(L"O nome novo aparece no Dock, no Launchpad e na barra de menus. Deixe vazio para voltar ao nome original."),+ L"Renomear", false, [chaves](const std::wstring& novo0) {+ std::wstring novo = novo0;+ for (auto& c : novo) if (c == L'\t' || c == L'\r' || c == L'\n') c = L' ';+ while (!novo.empty() && novo.back() == L' ') novo.pop_back();+ while (!novo.empty() && novo.front() == L' ') novo.erase(0, 1);+ std::wstring f = g_settingsPath.substr(0, g_settingsPath.find_last_of(L'\\')) + L"\\nomes-apps.txt";+ std::vector<std::wstring> linhas;+ FILE* fp = nullptr;+ if (!_wfopen_s(&fp, f.c_str(), L"r, ccs=UTF-8") && fp) {+ wchar_t line[1024];+ while (fgetws(line, 1024, fp)) {+ std::wstring s = line;+ while (!s.empty() && (s.back() == L'\n' || s.back() == L'\r')) s.pop_back();+ size_t tab = s.find(L'\t');+ if (tab == std::wstring::npos) continue;+ bool minha = false;+ for (auto& k : chaves) if (!_wcsicmp(s.substr(0, tab).c_str(), k.c_str())) minha = true;+ if (!minha) linhas.push_back(s);+ }+ fclose(fp);+ }+ if (!novo.empty()) for (auto& k : chaves) linhas.push_back(k + L"\t" + novo);+ if (!_wfopen_s(&fp, f.c_str(), L"w, ccs=UTF-8") && fp) {+ for (auto& l : linhas) fwprintf(fp, L"%ls\n", l.c_str());+ fclose(fp);+ }+ if (HWND sh = FindWindowW(L"ShellMensagens", nullptr)) { // o Dock e o Launchpad redesenham já+ static UINT m = RegisterWindowMessageW(L"ShellIconeMudou");+ PostMessageW(sh, m, 0, 0);+ }+ }, atual);+ return true;+}+std::wstring PageArg(int argc, wchar_t** argv) {for (int i = 1; i < argc; i++) {std::wstring a = argv[i];@@ -2325,10 +2378,11 @@ void aj::ButtonFace(Ctx& c, D2D1_RECT_F b, const std::wstring& label) { DrawButt// Pedido de senha (Wi-Fi) e parecidos: folha por cima do conteúdo, como no Mac.void AskText(const std::wstring& title, const std::wstring& message, const std::wstring& okLabel, bool password,- std::function<void(const std::wstring&)> ok) {+ std::function<void(const std::wstring&)> ok, const std::wstring& prefill) {g_sheet.open = true;g_sheet.title = title; g_sheet.message = message; g_sheet.okLabel = okLabel; g_sheet.password = password;- g_sheet.field.SetText(L"", false);+ g_sheet.field.SetText(prefill, false);+ if (!prefill.empty()) g_sheet.field.Select(0, (int)prefill.size());g_sheet.ok = ok;g_caretAt = GetTickCount();SetTimer(g_hwnd, T_CARET, 530, nullptr);@@ -2406,6 +2460,7 @@ int WINAPI wWinMain(HINSTANCE hi, HINSTANCE, LPWSTR, int) {ShowPage();g_leoAll = page.empty(); // Leopard: abre no Mostrar Todos, a não ser que tenham pedido um painelif (page == L"atualizacao") OpenUpdatePage();+ PedidoRenomear(page);// escondida (cloak) até o primeiro quadro estar pronto: sem isso a janela aparecia com a área da// direita ainda vazia e transparente (o que estava atrás aparecia através dela por alguns quadros)diff --git a/src/ajustes/paginas.cpp b/src/ajustes/paginas.cppindex 31ff4df..bf4d5fe 100644--- a/src/ajustes/paginas.cpp+++ b/src/ajustes/paginas.cpp@@ -22,7 +22,7 @@#pragma comment(lib, "mfuuid.lib")void AskText(const std::wstring& title, const std::wstring& message, const std::wstring& okLabel, bool password,- std::function<void(const std::wstring&)> ok);+ std::function<void(const std::wstring&)> ok, const std::wstring& prefill = L"");using namespace aj;diff --git a/src/comum/idioma_de.inc b/src/comum/idioma_de.incindex d75f1ed..de2d302 100644--- a/src/comum/idioma_de.inc+++ b/src/comum/idioma_de.inc@@ -1751,3 +1751,6 @@{ L"Mostrar Barra de Caminho", L"Pfadleiste einblenden" },{ L"Usar como Imagem da Mesa", L"Als Schreibtischhintergrund festlegen" },{ L"Não foi possível usar esta imagem na mesa", L"Dieses Bild konnte nicht als Hintergrund verwendet werden" },+{ L"Renomear…", L"Umbenennen …" },+{ L"O nome novo aparece no Dock, no Launchpad e na barra de menus. Deixe vazio para voltar ao nome original.", L"Der neue Name erscheint im Dock, im Launchpad und in der Menüleiste. Leer lassen, um zum ursprünglichen Namen zurückzukehren." },+{ L"Apps", L"Apps" },diff --git a/src/comum/idioma_en.inc b/src/comum/idioma_en.incindex 4e092c2..bdb27d1 100644--- a/src/comum/idioma_en.inc+++ b/src/comum/idioma_en.inc@@ -1751,3 +1751,6 @@{ L"Mostrar Barra de Caminho", L"Show Path Bar" },{ L"Usar como Imagem da Mesa", L"Set Desktop Picture" },{ L"Não foi possível usar esta imagem na mesa", L"Couldn't use this picture on the desktop" },+{ L"Renomear…", L"Rename…" },+{ L"O nome novo aparece no Dock, no Launchpad e na barra de menus. Deixe vazio para voltar ao nome original.", L"The new name shows in the Dock, Launchpad and the menu bar. Leave it empty to go back to the original name." },+{ L"Apps", L"Apps" },diff --git a/src/comum/idioma_es.inc b/src/comum/idioma_es.incindex f4e109a..f6880d3 100644--- a/src/comum/idioma_es.inc+++ b/src/comum/idioma_es.inc@@ -1751,3 +1751,6 @@{ L"Mostrar Barra de Caminho", L"Mostrar barra de ruta" },{ L"Usar como Imagem da Mesa", L"Usar como imagen del escritorio" },{ L"Não foi possível usar esta imagem na mesa", L"No se pudo usar esta imagen en el escritorio" },+{ L"Renomear…", L"Renombrar…" },+{ L"O nome novo aparece no Dock, no Launchpad e na barra de menus. Deixe vazio para voltar ao nome original.", L"El nuevo nombre aparece en el Dock, el Launchpad y la barra de menús. Déjalo vacío para volver al nombre original." },+{ L"Apps", L"Apps" },diff --git a/src/comum/idioma_fr.inc b/src/comum/idioma_fr.incindex 551b9eb..98c41cf 100644--- a/src/comum/idioma_fr.inc+++ b/src/comum/idioma_fr.inc@@ -1751,3 +1751,6 @@{ L"Mostrar Barra de Caminho", L"Afficher la barre du chemin d’accès" },{ L"Usar como Imagem da Mesa", L"Définir comme image du bureau" },{ L"Não foi possível usar esta imagem na mesa", L"Impossible d’utiliser cette image pour le bureau" },+{ L"Renomear…", L"Renommer…" },+{ L"O nome novo aparece no Dock, no Launchpad e na barra de menus. Deixe vazio para voltar ao nome original.", L"Le nouveau nom apparaît dans le Dock, le Launchpad et la barre des menus. Laissez vide pour revenir au nom d’origine." },+{ L"Apps", L"Apps" },diff --git a/src/comum/idioma_it.inc b/src/comum/idioma_it.incindex 5c022a8..0c29d4b 100644--- a/src/comum/idioma_it.inc+++ b/src/comum/idioma_it.inc@@ -1751,3 +1751,6 @@{ L"Mostrar Barra de Caminho", L"Mostra barra percorso" },{ L"Usar como Imagem da Mesa", L"Imposta come immagine della scrivania" },{ L"Não foi possível usar esta imagem na mesa", L"Impossibile usare questa immagine per la scrivania" },+{ L"Renomear…", L"Rinomina…" },+{ L"O nome novo aparece no Dock, no Launchpad e na barra de menus. Deixe vazio para voltar ao nome original.", L"Il nuovo nome appare nel Dock, nel Launchpad e nella barra dei menu. Lascia vuoto per tornare al nome originale." },+{ L"Apps", L"App" },diff --git a/src/comum/idioma_ja.inc b/src/comum/idioma_ja.incindex 8ef90c3..42e167e 100644--- a/src/comum/idioma_ja.inc+++ b/src/comum/idioma_ja.inc@@ -1751,3 +1751,6 @@{ L"Mostrar Barra de Caminho", L"パスバーを表示" },{ L"Usar como Imagem da Mesa", L"デスクトップピクチャを設定" },{ L"Não foi possível usar esta imagem na mesa", L"このイメージをデスクトップに使用できませんでした" },+{ L"Renomear…", L"名称変更…" },+{ L"O nome novo aparece no Dock, no Launchpad e na barra de menus. Deixe vazio para voltar ao nome original.", L"新しい名前は Dock、Launchpad、メニューバーに表示されます。空にすると元の名前に戻ります。" },+{ L"Apps", L"App" },diff --git a/src/comum/idioma_ko.inc b/src/comum/idioma_ko.incindex 04151d2..e668dd6 100644--- a/src/comum/idioma_ko.inc+++ b/src/comum/idioma_ko.inc@@ -1751,3 +1751,6 @@{ L"Mostrar Barra de Caminho", L"경로 막대 보기" },{ L"Usar como Imagem da Mesa", L"데스크탑 사진 설정" },{ L"Não foi possível usar esta imagem na mesa", L"이 사진을 데스크탑에 사용할 수 없습니다" },+{ L"Renomear…", L"이름 변경…" },+{ L"O nome novo aparece no Dock, no Launchpad e na barra de menus. Deixe vazio para voltar ao nome original.", L"새 이름은 Dock, Launchpad 및 메뉴 막대에 표시됩니다. 비워 두면 원래 이름으로 돌아갑니다." },+{ L"Apps", L"앱" },diff --git a/src/comum/idioma_pl.inc b/src/comum/idioma_pl.incindex da201f8..c5949bc 100644--- a/src/comum/idioma_pl.inc+++ b/src/comum/idioma_pl.inc@@ -1751,3 +1751,6 @@{ L"Mostrar Barra de Caminho", L"Pokaż pasek ścieżki" },{ L"Usar como Imagem da Mesa", L"Ustaw jako obrazek biurka" },{ L"Não foi possível usar esta imagem na mesa", L"Nie można użyć tego obrazka na biurku" },+{ L"Renomear…", L"Zmień nazwę…" },+{ L"O nome novo aparece no Dock, no Launchpad e na barra de menus. Deixe vazio para voltar ao nome original.", L"Nowa nazwa pojawi się w Docku, Launchpadzie i na pasku menu. Zostaw puste, aby wrócić do oryginalnej nazwy." },+{ L"Apps", L"Aplikacje" },diff --git a/src/comum/idioma_ru.inc b/src/comum/idioma_ru.incindex 061deec..cd980f8 100644--- a/src/comum/idioma_ru.inc+++ b/src/comum/idioma_ru.inc@@ -1751,3 +1751,6 @@{ L"Mostrar Barra de Caminho", L"Показать строку пути" },{ L"Usar como Imagem da Mesa", L"Установить картинку рабочего стола" },{ L"Não foi possível usar esta imagem na mesa", L"Не удалось использовать эту картинку для рабочего стола" },+{ L"Renomear…", L"Переименовать…" },+{ L"O nome novo aparece no Dock, no Launchpad e na barra de menus. Deixe vazio para voltar ao nome original.", L"Новое имя появится в Dock, Launchpad и строке меню. Оставьте пустым, чтобы вернуть исходное имя." },+{ L"Apps", L"Приложения" },diff --git a/src/comum/idioma_tr.inc b/src/comum/idioma_tr.incindex 2e5c300..17fb62c 100644--- a/src/comum/idioma_tr.inc+++ b/src/comum/idioma_tr.inc@@ -1751,3 +1751,6 @@{ L"Mostrar Barra de Caminho", L"Yol Çubuğunu Göster" },{ L"Usar como Imagem da Mesa", L"Masaüstü Resmi Olarak Ayarla" },{ L"Não foi possível usar esta imagem na mesa", L"Bu resim masaüstünde kullanılamadı" },+{ L"Renomear…", L"Yeniden Adlandır…" },+{ L"O nome novo aparece no Dock, no Launchpad e na barra de menus. Deixe vazio para voltar ao nome original.", L"Yeni ad Dock’ta, Launchpad’de ve menü çubuğunda görünür. Özgün ada dönmek için boş bırakın." },+{ L"Apps", L"Uygulamalar" },diff --git a/src/comum/idioma_zh.inc b/src/comum/idioma_zh.incindex a1de696..911bd7e 100644--- a/src/comum/idioma_zh.inc+++ b/src/comum/idioma_zh.inc@@ -1751,3 +1751,6 @@{ L"Mostrar Barra de Caminho", L"显示路径栏" },{ L"Usar como Imagem da Mesa", L"设定桌面图片" },{ L"Não foi possível usar esta imagem na mesa", L"无法将此图片用作桌面" },+{ L"Renomear…", L"重新命名…" },+{ L"O nome novo aparece no Dock, no Launchpad e na barra de menus. Deixe vazio para voltar ao nome original.", L"新名称会显示在程序坞、启动台和菜单栏中。留空可恢复原名称。" },+{ L"Apps", L"App" },diff --git a/src/shell/apps.cpp b/src/shell/apps.cppindex 0107488..0f9b0dc 100644--- a/src/shell/apps.cpp+++ b/src/shell/apps.cpp@@ -497,6 +497,59 @@ static std::vector<std::wstring> CustomKeys(const std::wstring& name, const std:if (std::wstring n = IconKey(name); !n.empty() && (k.empty() || _wcsicmp(n.c_str(), k[0].c_str()))) k.push_back(n);return k;}+static std::mutex g_nomesMx;+static std::map<std::wstring, std::wstring> g_nomes; // chave (minúsculas) -> nome escolhido+static std::wstring ArquivoNomes() {+ std::wstring d = apps::CustomIconDir(); // ...\Shell\icones-dock\ -> ...\Shell\nomes-apps.txt+ if (d.size() < 13) return L"";+ return d.substr(0, d.size() - 12) + L"nomes-apps.txt";+}+// relê o arquivo se ele mudou (conferido no máximo uma vez por segundo: o Dock pede o nome a cada quadro)+static void LeNomes() {+ static ULONGLONG quando = 0, gravado = 0;+ ULONGLONG agora = GetTickCount64();+ if (quando && agora - quando < 1000) return;+ quando = agora;+ WIN32_FILE_ATTRIBUTE_DATA fa{};+ std::wstring f = ArquivoNomes();+ ULONGLONG t = (!f.empty() && GetFileAttributesExW(f.c_str(), GetFileExInfoStandard, &fa))+ ? ((ULONGLONG)fa.ftLastWriteTime.dwHighDateTime << 32 | fa.ftLastWriteTime.dwLowDateTime) : 0;+ if (t == gravado) return;+ gravado = t;+ std::map<std::wstring, std::wstring> m;+ FILE* fp = nullptr;+ if (t && !_wfopen_s(&fp, f.c_str(), L"r, ccs=UTF-8") && fp) {+ wchar_t line[1024];+ while (fgetws(line, 1024, fp)) {+ std::wstring s = line;+ while (!s.empty() && (s.back() == L'\n' || s.back() == L'\r')) s.pop_back();+ if (!s.empty() && s[0] == 0xFEFF) s.erase(0, 1);+ size_t tab = s.find(L'\t');+ if (tab == std::wstring::npos || tab == 0 || tab + 1 >= s.size()) continue;+ m[Lower(s.substr(0, tab))] = s.substr(tab + 1);+ }+ fclose(fp);+ }+ std::lock_guard<std::mutex> lk(g_nomesMx);+ g_nomes.swap(m);+}+std::wstring apps::NomeVisivel(const std::wstring& name, const std::wstring& exe) {+ LeNomes();+ std::lock_guard<std::mutex> lk(g_nomesMx);+ if (g_nomes.empty()) return name;+ for (auto& k : CustomKeys(name, exe)) {+ auto it = g_nomes.find(Lower(k));+ if (it != g_nomes.end()) return it->second;+ }+ return name;+}+void apps::Renomear(const std::wstring& name, const std::wstring& exe) {+ auto limpa = [](std::wstring s) { for (auto& c : s) if (c == L'|' || c == L'"') c = L' '; return s; };+ std::wstring pedido = L"renomear:" + limpa(NomeVisivel(name, exe));+ for (auto& k : CustomKeys(name, exe)) pedido += L"|" + limpa(k);+ shell::Abrir(L"open", (shell::dir + L"\\" EXE_SETTINGS).c_str(), (L"\"--pagina=" + pedido + L"\"").c_str());+}+std::wstring apps::CustomIcon(const std::wstring& name, const std::wstring& exe) {std::wstring dir = CustomIconDir();if (dir.empty()) return L"";diff --git a/src/shell/dock.cpp b/src/shell/dock.cppindex 96f07b7..7fda3f9 100644--- a/src/shell/dock.cpp+++ b/src/shell/dock.cpp@@ -635,6 +635,26 @@ std::wstring IconExe(const App& a) { return a.finder ? L"" : a.exe.empty() ? a.istd::wstring CustomIconPath(const App& a) { return apps::CustomIcon(IconName(a), IconExe(a)); }std::map<std::wstring, bool> g_customIcon; // app -> tem ícone próprio (desenhado como os do pacote)+// O ícone próprio do Launchpad no Dock (pedido no Discord, 24/11/2026): Launchpad.png na pasta dos ícones próprios,+// escolhido pelo botão direito > Alterar Ícone…; nullptr = o do pacote+ID2D1Bitmap* LaunchpadProprio(ID2D1RenderTarget* rt) {+ if (g_bmpRt != rt) { for (auto& [k, b] : g_bmps) if (b) b->Release(); g_bmps.clear(); g_bmpRt = rt; }+ auto ck = g_bmps.find(L"proprio:launchpad");+ if (ck != g_bmps.end()) return ck->second;+ auto known = g_customIcon.find(L"launchpad:");+ if (known != g_customIcon.end() && !known->second) return nullptr;+ std::wstring f = apps::CustomIcon(L"Launchpad", L"");+ UINT w = 0, h = 0; std::vector<BYTE> px;+ bool ok = !f.empty() && ui::LoadPng(f, w, h, px);+ g_customIcon[L"launchpad:"] = ok;+ if (!ok) return nullptr;+ std::wstring st = ui::IconStyle();+ if (st != L"padrao") ui::StyleIcon(w, h, px, st);+ ID2D1Bitmap* b = ui::Bitmap(rt, w, h, px);+ g_bmps[L"proprio:launchpad"] = b;+ return b;+}+ID2D1Bitmap* IconBitmap(ID2D1RenderTarget* rt, App& a) {if (g_bmpRt != rt) { for (auto& [k, b] : g_bmps) if (b) b->Release(); g_bmps.clear(); g_bmpRt = rt; }{@@ -737,8 +757,8 @@ bool Animating() {std::wstring Label(const Item& it) {if (it.kind == I_GHOST) return L"";- if (it.kind == I_APP) return apps::list[it.app].name;- if (it.kind == I_MINWIN) { wchar_t t[200] = {}; GetWindowTextW(it.win, t, 200); return t[0] ? t : apps::list[it.app].name; }+ if (it.kind == I_APP) return apps::NomeVisivel(IconName(apps::list[it.app]), IconExe(apps::list[it.app]));+ if (it.kind == I_MINWIN) { wchar_t t[200] = {}; GetWindowTextW(it.win, t, 200); return t[0] ? t : apps::NomeVisivel(IconName(apps::list[it.app]), IconExe(apps::list[it.app])); }if (it.kind == I_DOWNLOADS) return L"Downloads";if (it.kind == I_LAUNCHPAD) return LEO_DOCK ? Tr(L"Aplicativos") : L"Launchpad"; // Leopard: a pasta Aplicativosif (it.kind == I_TRASH) return Tr(L"Lixeira");@@ -1155,6 +1175,7 @@ void Paint() {if (drew) continue;b = PackBitmap(rt, L"folder downloads"); mac = b != nullptr;}+ else if (it.kind == I_LAUNCHPAD && !LEO_DOCK && (b = LaunchpadProprio(rt)) != nullptr) mac = true;else { b = PackBitmap(rt, it.kind == I_LAUNCHPAD ? L"Launchpad" : it.kind == I_DOWNLOADS ? L"folder downloads" : g_trashFull ? L"trashfull@2x" : L"trashempty@2x"); mac = b != nullptr; }// ícones do pacote do Sequoia já têm a margem do Mac; os do Windows (recortados) ficam com o mesmo corpo visualfloat art = s * (mac ? ART_PACK : ART_WIN);@@ -1389,7 +1410,21 @@ void ContextMenu(int i) {Paint();return;}- if (it.kind == I_LAUNCHPAD) return;+ if (it.kind == I_LAUNCHPAD) { // como no Mac (Abrir, Opções); e o ícone próprio, pedido no Discord+ if (LEO_DOCK) return;+ bool proprio = !apps::CustomIcon(L"Launchpad", L"").empty();+ ctxmenu::Item opts = MI(Tr(L"Opções"), 0);+ opts.sub.push_back(MI(Tr(L"Alterar Ícone…"), 2));+ if (proprio) opts.sub.push_back(MI(Tr(L"Restaurar Ícone Original"), 3));+ opts.sub.push_back(MSep());+ opts.sub.push_back(MI(Tr(L"Remover do Dock"), 4));+ int id = ShowMenu(i, { opts, MSep(), MI(Tr(L"Abrir"), 1) });+ if (id == 1) launchpad::Toggle();+ else if (id == 2) apps::ChooseIcon(L"Launchpad", L"");+ else if (id == 3) apps::RestoreIcon(L"Launchpad", L"");+ else if (id == 4) { shell::SetSetting(L"dock_launchpad", L"0"); dock::ReloadSettings(); }+ return;+ }if (it.kind == I_TRASH) {int id = ShowMenu(i, { MI(Tr(L"Abrir"), 1), MSep(), MI(Tr(L"Esvaziar Lixeira…"), 2, false, !g_trashFull) });if (id == 1) OpenFinder(L"shell:RecycleBinFolder"); // a Lixeira no Finder@@ -1447,6 +1482,7 @@ void ContextMenu(int i) {opts.sub.push_back(MSep());opts.sub.push_back(MI(Tr(L"Alterar Ícone…"), 18));if (!CustomIconPath(a).empty()) opts.sub.push_back(MI(Tr(L"Restaurar Ícone Original"), 19));+ if (!a.finder) opts.sub.push_back(MI(Tr(L"Renomear…"), 22)); // pedido no Discordm.push_back(opts);m.push_back(MSep());if (!a.wins.empty()) {@@ -1468,6 +1504,7 @@ void ContextMenu(int i) {case 11: apps::SetOpenAtLogin(*ap, !apps::OpenAtLogin(*ap)); break;case 12: apps::ShowInFinder(*ap); break;case 18: apps::ChooseIcon(IconName(*ap), IconExe(*ap)); break;+ case 22: apps::Renomear(IconName(*ap), IconExe(*ap)); break;case 19: apps::RestoreIcon(IconName(*ap), IconExe(*ap)); break;case 13: missioncontrol::ToggleApp(ap->id, ap->name); break; // como no Mac: o Exposé do appcase 14: apps::Hide(*ap); break;diff --git a/src/shell/launchpad.cpp b/src/shell/launchpad.cppindex 0877d6e..4852222 100644--- a/src/shell/launchpad.cpp+++ b/src/shell/launchpad.cpp@@ -35,6 +35,8 @@ static ID2D1Bitmap* StyledBitmap(ID2D1RenderTarget* rt, UINT w, UINT h, const stnamespace {+struct LApp;+std::wstring NomeDe(const LApp& a); // o nome escolhido (Renomear…), mais abaixostruct LApp {std::wstring name, parsing; // parsing: o que vem depois de shell:AppsFolder\ (AUMID ou caminho)UINT w = 0, h = 0;@@ -42,6 +44,10 @@ struct LApp {bool mac = false; // ícone do pacote do SequoiaID2D1Bitmap* bmp = nullptr;};+std::wstring NomeDe(const LApp& a) {+ bool exe = a.parsing.size() > 4 && !_wcsicmp(a.parsing.c_str() + a.parsing.size() - 4, L".exe");+ return apps::NomeVisivel(a.name, exe ? a.parsing : L"");+}const UINT WM_LP_READY = WM_APP + 20, WM_LP_FRAME = WM_APP + 21;const int COLS = 7, ROWS = 5, PER_PAGE = COLS * ROWS;@@ -524,7 +530,8 @@ void PaintApps(ID2D1DeviceContext* dc, const Geo& g, float ease) {if (a.bmp && ir.bottom > clip.top && ir.top < clip.bottom) dc->DrawBitmap(a.bmp, ir, 1, D2D1_INTERPOLATION_MODE_HIGH_QUALITY_CUBIC);if (list[k] == g_press) { br->SetColor(D2D1::ColorF(0, 0, 0, 0.25f)); dc->FillRoundedRectangle(D2D1::RoundedRect(ir, art * 0.22f, art * 0.22f), br); }br->SetColor(text);- dc->DrawTextW(a.name.c_str(), (UINT32)a.name.size(), g_apLabel, D2D1::RectF(cx - cell / 2 + 4, y + AP_ICON + 10, cx + cell / 2 - 4, y + AP_ICON + 28), br);+ std::wstring nome = NomeDe(a);+ dc->DrawTextW(nome.c_str(), (UINT32)nome.size(), g_apLabel, D2D1::RectF(cx - cell / 2 + 4, y + AP_ICON + 10, cx + cell / 2 - 4, y + AP_ICON + 28), br);g_apHits.push_back({ D2D1::RectF(cx - cell / 2 + 6, y, cx + cell / 2 - 6, y + AP_ROW - 6), 0, list[k] });}y += AP_ROW + 8;@@ -656,18 +663,19 @@ void Paint() {DWRITE_TRIMMING t{ DWRITE_TRIMMING_GRANULARITY_CHARACTER, 0, 0 }; IDWriteInlineObject* d = nullptr; ui::dw->CreateEllipsisTrimmingSign(f, &d); f->SetTrimming(&t, d); if (d) d->Release(); }return f;}();+ std::wstring nome = NomeDe(a);if (liquid::Leopard() && tfLeo) {br->SetColor(D2D1::ColorF(0, 0, 0, 0.75f));- dc->DrawTextW(a.name.c_str(), (UINT32)a.name.size(), tfLeo, D2D1::RectF(lr.left, lr.top + 1.5f, lr.right, lr.bottom + 1.5f), br);+ dc->DrawTextW(nome.c_str(), (UINT32)nome.size(), tfLeo, D2D1::RectF(lr.left, lr.top + 1.5f, lr.right, lr.bottom + 1.5f), br);br->SetColor(D2D1::ColorF(1, 1, 1, 0.98f));- dc->DrawTextW(a.name.c_str(), (UINT32)a.name.size(), tfLeo, lr, br);+ dc->DrawTextW(nome.c_str(), (UINT32)nome.size(), tfLeo, lr, br);if (g_jiggle) dc->SetTransform(base);continue;}br->SetColor(D2D1::ColorF(0, 0, 0, 0.35f)); // sombra leve do texto- dc->DrawTextW(a.name.c_str(), (UINT32)a.name.size(), g_tfLabel, D2D1::RectF(lr.left, lr.top + 1, lr.right, lr.bottom + 1), br);+ dc->DrawTextW(nome.c_str(), (UINT32)nome.size(), g_tfLabel, D2D1::RectF(lr.left, lr.top + 1, lr.right, lr.bottom + 1), br);br->SetColor(D2D1::ColorF(1, 1, 1, 0.96f));- dc->DrawTextW(a.name.c_str(), (UINT32)a.name.size(), g_tfLabel, lr, br);+ dc->DrawTextW(nome.c_str(), (UINT32)nome.size(), g_tfLabel, lr, br);if (g_jiggle) dc->SetTransform(base);}}@@ -965,6 +973,7 @@ LRESULT CALLBACK Proc(HWND h, UINT m, WPARAM w, LPARAM l) {std::vector<ctxmenu::Item> extra{ { Tr(L"Ocultar do Launchpad"), 2, false, false, false, L"", {}, 0xED1A },{ Tr(L"Alterar Ícone…"), 3, false, false, false, L"", {}, 0xEB9F } };if (apps::HasCustomIcon(name, exe)) extra.push_back({ Tr(L"Restaurar Ícone Original"), 4, false, false, false, L"", {}, 0xE7A7 });+ extra.push_back({ Tr(L"Renomear…"), 5, false, false, false, L"", {}, 0xE8AC }); // pedido no Discordctxmenu::ExtraNext(extra);auto res = ctxmenu::Show(h, sp, L"shell:AppsFolder", { path }, GetKeyState(VK_SHIFT) < 0);ctxmenu::ExtraNext({});@@ -972,6 +981,7 @@ LRESULT CALLBACK Proc(HWND h, UINT m, WPARAM w, LPARAM l) {if (res.extra == 2) { launchpad::Ocultar(name); { std::lock_guard<std::mutex> lk(g_mu); Filter(); } Paint(); return 0; }if (res.extra == 3) { Close(); apps::ChooseIcon(name, exe); return 0; } // o Launchpad cobre a tela: fecha antes da janela de Abririf (res.extra == 4) { apps::RestoreIcon(name, exe); return 0; }+ if (res.extra == 5) { Close(); apps::Renomear(name, exe); return 0; }if (res.chosen) Close();return 0;}diff --git a/src/shell/menubar.cpp b/src/shell/menubar.cppindex 73de4e6..51d283b 100644--- a/src/shell/menubar.cpp+++ b/src/shell/menubar.cpp@@ -2006,7 +2006,7 @@ void menubar::Update() {}}App* a = ActiveApp();- g_appName = a ? a->name : L"Finder";+ g_appName = a ? (a->finder ? a->name : apps::NomeVisivel(a->name, a->exe.empty() ? a->id : a->exe)) : L"Finder";if (wchar_t cls[32] = {}; g_fg && GetClassNameW(g_fg, cls, 32) && !wcscmp(cls, L"AjustesJanela")) g_appName = TrPick(L"Ajustes do Sistema", L"System Settings");g_hmenu = (g_fg && !g_finderActive) ? GetMenu(g_fg) : nullptr;if (!g_hmenu && g_fg && !g_finderActive) g_hmenu = (HMENU)GetPropW(g_fg, L"MacJanelaMenu"); // tirada da janela pela MacJanela.dlldiff --git a/src/shell/shell.h b/src/shell/shell.hindex acb55ac..ae54fcf 100644--- a/src/shell/shell.h+++ b/src/shell/shell.h@@ -200,6 +200,11 @@ std::wstring PackIconByName(const std::wstring& name, const std::wstring& exe =std::wstring CustomIconDir(); // com a barra no fimstd::wstring CustomIcon(const std::wstring& name, const std::wstring& exe); // o PNG escolhido, ou ""bool HasCustomIcon(const std::wstring& name, const std::wstring& exe);+// Nome próprio do app (pedido no Discord, 24/11/2026: "renomear apps"): %APPDATA%\Shell\nomes-apps.txt, uma linha+// "chave<TAB>nome" por chave (as mesmas do ícone próprio: o .exe e o nome original). Vale no Dock, no Launchpad e na+// barra de menus. Renomear abre os Ajustes com o campo de texto (o Shell não tem campo de digitar nos alertas).+std::wstring NomeVisivel(const std::wstring& name, const std::wstring& exe);+void Renomear(const std::wstring& name, const std::wstring& exe);void ChooseIcon(const std::wstring& name, const std::wstring& exe); // janela de Abrir (outra thread); avisa "ShellIconeMudou"void RestoreIcon(const std::wstring& name, const std::wstring& exe); // apaga o ícone próprio; avisa "ShellIconeMudou"void ReloadIcons(); // Dock, Alt+Tab e Launchpad relêem os ícones (thread da interface)diff --git a/src/shell/som.cpp b/src/shell/som.cppindex 7905b83..2e408cd 100644--- a/src/shell/som.cpp+++ b/src/shell/som.cpp@@ -12,6 +12,7 @@#include <dwmapi.h>#include <mmdeviceapi.h>#include <endpointvolume.h>+#include <audiopolicy.h>#include <functiondiscoverykeys_devpkey.h>#include <algorithm>#include <cmath>@@ -104,6 +105,79 @@ void Read(bool outs) {en->Release();}+// ---- volume por app (mixer de volume, pedido no Discord, 24/11/2026): as sessões de áudio da saída padrão, juntas+// por programa (o Chrome tem várias), como o Mixer de Volume do Windows. Os sons do sistema ficam de fora (o volume+// geral já é deles). O nome é o do app no Dock quando ele está lá (com o nome escolhido em Renomear…), senão o do .exe.+struct AppVol { std::wstring exe, name; float vol = 1; bool mute = false; std::vector<ISimpleAudioVolume*> vs; };+std::vector<AppVol> g_apps;+const size_t MAX_APPS = 8;+void SoltaApps() { for (auto& a : g_apps) for (auto* v : a.vs) v->Release(); g_apps.clear(); }+std::wstring NomeDoApp(const std::wstring& exe) {+ std::wstring low = exe; for (auto& c : low) c = towlower(c);+ for (auto& a : apps::list) {+ std::wstring e = a.exe; for (auto& c : e) c = towlower(c);+ if (!e.empty() && e == low) return a.finder ? a.name : apps::NomeVisivel(a.name, a.exe);+ }+ std::wstring n = exe.substr(exe.find_last_of(L'\\') + 1);+ if (n.size() > 4 && !_wcsicmp(n.c_str() + n.size() - 4, L".exe")) n.resize(n.size() - 4);+ if (!n.empty()) n[0] = towupper(n[0]);+ return apps::NomeVisivel(n, exe);+}+void ReadApps() {+ SoltaApps();+ IMMDeviceEnumerator* en = nullptr;+ if (FAILED(CoCreateInstance(__uuidof(MMDeviceEnumerator), nullptr, CLSCTX_ALL, IID_PPV_ARGS(&en)))) return;+ IMMDevice* d = nullptr;+ IAudioSessionManager2* mg = nullptr;+ IAudioSessionEnumerator* se = nullptr;+ if (SUCCEEDED(en->GetDefaultAudioEndpoint(eRender, eConsole, &d)) &&+ SUCCEEDED(d->Activate(__uuidof(IAudioSessionManager2), CLSCTX_ALL, nullptr, (void**)&mg)) &&+ SUCCEEDED(mg->GetSessionEnumerator(&se))) {+ int n = 0; se->GetCount(&n);+ for (int i = 0; i < n; i++) {+ IAudioSessionControl* c = nullptr;+ if (FAILED(se->GetSession(i, &c))) continue;+ IAudioSessionControl2* c2 = nullptr;+ AudioSessionState st = AudioSessionStateExpired;+ c->GetState(&st);+ if (st != AudioSessionStateExpired && SUCCEEDED(c->QueryInterface(IID_PPV_ARGS(&c2))) && c2->IsSystemSoundsSession() != S_OK) {+ DWORD pid = 0; c2->GetProcessId(&pid);+ std::wstring exe;+ if (pid && pid != GetCurrentProcessId())+ if (HANDLE ph = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pid)) {+ wchar_t p[MAX_PATH]; DWORD len = MAX_PATH;+ if (QueryFullProcessImageNameW(ph, 0, p, &len)) exe = p;+ CloseHandle(ph);+ }+ ISimpleAudioVolume* sv = nullptr;+ if (!exe.empty() && SUCCEEDED(c->QueryInterface(IID_PPV_ARGS(&sv)))) {+ auto it = std::find_if(g_apps.begin(), g_apps.end(), [&](const AppVol& a) { return !_wcsicmp(a.exe.c_str(), exe.c_str()); });+ if (it == g_apps.end() && g_apps.size() < MAX_APPS) {+ AppVol a; a.exe = exe; a.name = NomeDoApp(exe);+ BOOL m = FALSE; sv->GetMasterVolume(&a.vol); sv->GetMute(&m); a.mute = m != FALSE;+ a.vs.push_back(sv);+ g_apps.push_back(std::move(a));+ } else if (it != g_apps.end()) it->vs.push_back(sv);+ else sv->Release();+ }+ }+ if (c2) c2->Release();+ c->Release();+ }+ }+ if (se) se->Release();+ if (mg) mg->Release();+ if (d) d->Release();+ en->Release();+ std::sort(g_apps.begin(), g_apps.end(), [](const AppVol& a, const AppVol& b) { return _wcsicmp(a.name.c_str(), b.name.c_str()) < 0; });+}+void SetAppVolume(size_t i, float v) {+ if (i >= g_apps.size()) return;+ v = std::clamp(v, 0.f, 1.f);+ for (auto* s : g_apps[i].vs) { s->SetMasterVolume(v, nullptr); s->SetMute(v <= 0.001f, nullptr); }+ g_apps[i].vol = v; g_apps[i].mute = v <= 0.001f;+}+void SetVolume(float v) {v = std::clamp(v, 0.f, 1.f);if (IAudioEndpointVolume* e = Endpoint()) {@@ -264,7 +338,12 @@ struct Hit { int id; D2D1_RECT_F r; };std::vector<Hit> g_hits;float SepY2() { return ROWS_Y + ROW_H * (float)g_au.outs.size() + 6; }-float MenuH() { return SepY2() + 33; }+const float APP_H = 30, APP_L = 128; // linhas da seção Apps; o controle de cada app começa em APP_L+float AppsH() { return g_apps.empty() ? 0.f : 26 + APP_H * (float)g_apps.size() + 4; }+float SepY3() { return SepY2() + AppsH(); }+float MenuH() { return SepY3() + 33; }+int g_dragApp = -1; // arrastando o controle de um app (índice em g_apps)+enum { H_APP0 = 3000 };float MenuR() { return liquid::On() ? 14.f : 10.f; }float Sc() { return ui::Scale(g_m.wnd); }@@ -399,6 +478,29 @@ void PaintMenu() {}float s2 = SepY2();sep(s2);+ if (!g_apps.empty()) { // Apps: um controle de volume para cada app que está tocando som+ Text(dc, br, Tr(L"Apps"), D2D1::RectF(14, s2 + 3, MW - 14, s2 + 23), g_tfHead, p.text2);+ for (size_t i = 0; i < g_apps.size(); i++) {+ const AppVol& a = g_apps[i];+ float y = s2 + 26 + APP_H * i, cy = y + APP_H / 2;+ Text(dc, br, a.name, D2D1::RectF(14, y, APP_L - 8, y + APP_H), g_tfRow, p.text);+ float l = APP_L, r = MW - 18, v = a.mute ? 0.f : a.vol;+ float kx = l + 7 + v * (r - l - 14);+ br->SetColor(p.sep);+ dc->FillRoundedRectangle(D2D1::RoundedRect(D2D1::RectF(l, cy - 2, r, cy + 2), 2, 2), br);+ br->SetColor(BLUE);+ dc->FillRoundedRectangle(D2D1::RoundedRect(D2D1::RectF(l, cy - 2, kx, cy + 2), 2, 2), br);+ D2D1_RECT_F k = D2D1::RectF(kx - 7, cy - 7, kx + 7, cy + 7);+ Shadow(dc, br, k, 7, 0.16f);+ br->SetColor(g_dragApp == (int)i ? D2D1::ColorF(0.93f, 0.93f, 0.94f) : D2D1::ColorF(1, 1, 1));+ dc->FillEllipse(D2D1::Ellipse({ kx, cy }, 7, 7), br);+ br->SetColor(D2D1::ColorF(0, 0, 0, dark ? 0.25f : 0.12f));+ dc->DrawEllipse(D2D1::Ellipse({ kx, cy }, 6.75f, 6.75f), br, 0.5f);+ g_hits.push_back({ H_APP0 + (int)i, D2D1::RectF(l - 8, y + 2, r + 8, y + APP_H - 2) });+ }+ s2 = SepY3();+ sep(s2);+ }D2D1_RECT_F set = D2D1::RectF(5, s2 + 5, MW - 5, s2 + 28);if (g_hover == H_SETTINGS) { br->SetColor(p.hover); dc->FillRoundedRectangle(D2D1::RoundedRect(set, 6, 6), br); }Text(dc, br, Tr(L"Ajustes de Som…"), D2D1::RectF(14, set.top, MW - 14, set.bottom), g_tfRow, p.text);@@ -432,6 +534,8 @@ void CloseMenu() {g_closedAt = GetTickCount();if (g_drag) { g_drag = false; ReleaseCapture(); }g_press = 0; g_stretch = 0; g_hover = -1;+ if (g_dragApp >= 0) { g_dragApp = -1; ReleaseCapture(); }+ SoltaApps();KillTimer(g_m.wnd, T_POLL);ui::FrameClock(g_m.wnd, WM_SOM_FRAME, false);GlassHide(g_m);@@ -468,10 +572,18 @@ LRESULT CALLBACK MenuProc(HWND h, UINT m, WPARAM w, LPARAM l) {return 0;}case WM_TIMER: // volume mudado por fora (teclas, outros apps) aparece no controle- if (w == T_POLL && g_open && !g_drag) {+ if (w == T_POLL && g_open && !g_drag && g_dragApp < 0) {float v = g_au.vol; bool mu = g_au.mute; size_t n = g_au.outs.size();Read(false);- if (v != g_au.vol || mu != g_au.mute || n != g_au.outs.size()) PaintMenu();+ std::wstring antes; for (auto& a : g_apps) antes += a.exe + L"|" + std::to_wstring(a.vol) + L"|";+ ReadApps();+ std::wstring depois; for (auto& a : g_apps) depois += a.exe + L"|" + std::to_wstring(a.vol) + L"|";+ if (antes != depois) { // um app começou ou parou de tocar: o menu muda de altura+ RECT wr; GetWindowRect(h, &wr);+ float sc = Sc();+ GlassPlace(g_m, wr.left, wr.top, (int)std::lround(MW * sc), (int)std::lround(MenuH() * sc), false);+ }+ if (v != g_au.vol || mu != g_au.mute || n != g_au.outs.size() || antes != depois) PaintMenu();}return 0;case WM_LBUTTONDOWN: {@@ -481,6 +593,11 @@ LRESULT CALLBACK MenuProc(HWND h, UINT m, WPARAM w, LPARAM l) {g_drag = true; g_lastKx = -1; g_lastFrame = anim::Now();SetCapture(h);DragTo(p.x);+ } else if (id >= H_APP0 && id < H_APP0 + (int)g_apps.size()) {+ g_dragApp = id - H_APP0;+ SetCapture(h);+ SetAppVolume((size_t)g_dragApp, (p.x - APP_L - 7) / (MW - 18 - APP_L - 14));+ PaintMenu();} else if (id == H_SETTINGS) {CloseMenu();shell::OpenSettings(L"som");@@ -500,6 +617,7 @@ LRESULT CALLBACK MenuProc(HWND h, UINT m, WPARAM w, LPARAM l) {case WM_MOUSEMOVE: {D2D1_POINT_2F p = Pt(h, l);if (g_drag) { DragTo(p.x); return 0; }+ if (g_dragApp >= 0) { SetAppVolume((size_t)g_dragApp, (p.x - APP_L - 7) / (MW - 18 - APP_L - 14)); PaintMenu(); return 0; }TRACKMOUSEEVENT tme{ sizeof(tme), TME_LEAVE, h, 0 }; TrackMouseEvent(&tme);int id = HitAt(p);int hv = (id == H_SETTINGS || (id >= 0 && id < (int)g_au.outs.size())) ? id : -1;@@ -508,6 +626,7 @@ LRESULT CALLBACK MenuProc(HWND h, UINT m, WPARAM w, LPARAM l) {}case WM_MOUSELEAVE: if (g_hover != -1) { g_hover = -1; PaintMenu(); } return 0;case WM_LBUTTONUP:+ if (g_dragApp >= 0) { g_dragApp = -1; ReleaseCapture(); PaintMenu(); return 0; }if (g_drag) {g_drag = false; g_lastKx = -1;ReleaseCapture();@@ -516,7 +635,10 @@ LRESULT CALLBACK MenuProc(HWND h, UINT m, WPARAM w, LPARAM l) {Animate();}return 0;- case WM_CAPTURECHANGED: if (g_drag && (HWND)l != h) { g_drag = false; g_lastKx = -1; Animate(); } return 0;+ case WM_CAPTURECHANGED:+ if (g_dragApp >= 0 && (HWND)l != h) { g_dragApp = -1; PaintMenu(); }+ if (g_drag && (HWND)l != h) { g_drag = false; g_lastKx = -1; Animate(); }+ return 0;case WM_MOUSEWHEEL:SetVolume((g_au.mute ? 0 : g_au.vol) + GET_WHEEL_DELTA_WPARAM(w) / 120.f / 32.f);PaintMenu();@@ -708,6 +830,7 @@ void som::Toggle(RECT icon) {if (GetTickCount() - g_closedAt < 300) return; // o clique no ícone acabou de fechar o menu (perdeu o foco)HideHud();Read(true);+ ReadApps();g_icon = icon;MW = liquid::On() ? 308.f : 320.f; TRACK_R = MW - 38;g_open = true;