Merge remote-tracking branch 'upstream/dev3' into dev
All checks were successful
Sync to Codeberg / codeberg (push) Has been skipped

This commit is contained in:
thororen 2026-09-05 14:57:18 -04:00
commit 3b617d4f02
No known key found for this signature in database
2 changed files with 36 additions and 6 deletions

View file

@ -10,15 +10,34 @@
*/
import { app } from "electron";
import EventEmitter from "events";
import { dirname, join } from "path";
import { findStaleSibling, patchResourcesDir } from "./applyHostPatch";
app.on("before-quit", () => {
function patchLatest() {
if (process.env.DISABLE_UPDATER_AUTO_PATCHING) return;
try {
const stale = findStaleSibling(dirname(process.execPath));
if (stale) patchResourcesDir(stale, join(__dirname, "patcher.js"));
} catch (err) {
console.error("[Equicord] Failed to repatch latest host update", err);
}
});
}
if (process.platform === "win32" || process.platform === "linux") {
EventEmitter.prototype.emit = new Proxy(EventEmitter.prototype.emit, {
apply(target, thisArg, argArray) {
if (argArray[0] === "host-updated") {
patchLatest();
}
return Reflect.apply(target, thisArg, argArray);
},
});
// Try to patch latest on before-quit
// Discord's Win32 updater will call app.quit() on restart and open new version on will-quit
app.on("before-quit", patchLatest);
}

View file

@ -9,9 +9,16 @@
--custom-app-top-bar-height: env(titlebar-area-height, 0px) !important;
}
/* position trailing titlebar elements alongside WCO */
[data-fullscreen] > [class*="bar_"] [class*="trailing_"] {
padding-right: calc(100vw - env(titlebar-area-width, 100%) - env(titlebar-area-x, 0px));
/* position trailing/leading titlebar elements alongside WCO */
[data-fullscreen] > [class*="bar_"] {
[class*="leading_"] {
padding-left: env(titlebar-area-x, 0);
}
[class*="trailing_"] {
padding-right: calc(100vw - env(titlebar-area-width, 100%) - env(titlebar-area-x, 0px));
}
}
/* popout windows like screenshare popout, these properties don't work outside WCO so this is safe */
@ -19,6 +26,10 @@
[class*="headerWrapper_"] {
app-region: drag;
[class*="headerBarChildren_"] {
padding-left: env(titlebar-area-x, 0);
}
/* position trailing toolbar elements alongside WCO */
[class*="toolbar_"] {
padding-right: calc(100vw - env(titlebar-area-width, 100%) - env(titlebar-area-x, 0px));
@ -35,4 +46,4 @@
display: none;
}
}
}
}