From 7592b5c172ddd31bf8a73fb52fd0736183479ba6 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Tue, 6 Feb 2024 13:31:02 -0300 Subject: [PATCH] Fix devtools context menus on canary --- src/main/patcher.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/patcher.ts b/src/main/patcher.ts index 76d1ccaf3..3ee44d92c 100644 --- a/src/main/patcher.ts +++ b/src/main/patcher.ts @@ -129,6 +129,15 @@ if (!IS_VANILLA) { }); process.env.DATA_DIR = join(app.getPath("userData"), "..", "Vencord"); + + // Monkey patch commandLine to disable WidgetLayering: Fix DevTools context menus https://github.com/electron/electron/issues/38790 + const originalAppend = app.commandLine.appendSwitch; + app.commandLine.appendSwitch = function (...args) { + if (args[0] === "disable-features" && !args[1]?.includes("WidgetLayering")) { + args[1] += ",WidgetLayering"; + } + return originalAppend.apply(this, args); + }; } else { console.log("[Vencord] Running in vanilla mode. Not loading Vencord"); }