diff --git a/CHANGELOG.md b/CHANGELOG.md index 21412e5..89cce18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added ### Changed ### Fixed +- **Overlay caía para trás ao clicar fora.** No Mutter/XWayland o estado + `_NET_WM_STATE_ABOVE` oscilava ao perder o foco: clicar em outra janela ou no + desktop mandava o overlay para o fundo, sem passar por `toggleWin`/`revealIfHidden` + (únicos pontos que reafirmavam o `alwaysOnTop`). Agora `win.on('blur')` reafirma + `setAlwaysOnTop(true, 'screen-saver')` + `moveTop()` — mesmo padrão do toggle/reveal. + Complementa o raise explícito da v0.6.7. ## [0.6.7] - 2026-07-09 diff --git a/main.js b/main.js index c0749b2..d27e672 100644 --- a/main.js +++ b/main.js @@ -562,6 +562,14 @@ function createWindow() { // Linux/Mutter ignora `maximizable` → reverte na hora qualquer maximize // (Super+↑, drag no topo da tela, tiling). Overlay nunca vira tela cheia. win.on('maximize', () => { try { win.unmaximize(); } catch {} }); + // Mutter/XWayland: o estado _NET_WM_STATE_ABOVE oscila ao perder foco (ver + // CHANGELOG 0.6.7) — clicar em outra janela/no desktop derruba o always-on-top + // sem passar por toggleWin/revealIfHidden. Reafirma no blur, do mesmo jeito + // que já se faz no toggle/reveal (setAlwaysOnTop + moveTop). + win.on('blur', () => { + try { win.setAlwaysOnTop(true, 'screen-saver'); } catch {} + try { win.moveTop(); } catch {} + }); // skipTaskbar FORÇADO via wmctrl: no Mutter, com frameless+transparent+ // alwaysOnTop, nem a option `skipTaskbar` nem setSkipTaskbar() geram o // hint X11 _NET_WM_STATE_SKIP_TASKBAR/PAGER de forma confiável (ele é