diff --git a/src/Boot.tsx b/src/Boot.tsx index c8fb17d6..b42d4cc8 100644 --- a/src/Boot.tsx +++ b/src/Boot.tsx @@ -633,9 +633,23 @@ document.addEventListener("anura-login-completed", async () => { }); } + const desktopCtx = new ContextMenu(true); // we are init'ing before anura so this is needed + + desktopCtx.addItem( + "Set wallpaper", + () => { + // this however will execute after anura is init'ed + anura.apps["anura.wallpaper"].open(); + }, + "wallpaper", + ); + document.addEventListener("contextmenu", function (e) { if (e.shiftKey) return; e.preventDefault(); + if (e.target === document.body) { + desktopCtx.show(e.clientX, e.clientY); + } }); document.addEventListener("keydown", (e) => {