From ffbdf89609687c5999e27c63122299adf1621704 Mon Sep 17 00:00:00 2001 From: MeexReay Date: Sat, 22 Mar 2025 01:57:11 +0300 Subject: [PATCH] startz fix 2x --- app/mxwm/startz.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/mxwm/startz.js b/app/mxwm/startz.js index 87167ee..316c3fe 100644 --- a/app/mxwm/startz.js +++ b/app/mxwm/startz.js @@ -7,14 +7,18 @@ async function main(args) { let ctx = getGraphics() - setInterval(() => { + while (true) { ctx.fillStyle = "black" ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height) for (const win of window.mxwm_windows) { ctx.drawImage(win.canvas, win.x, win.y); } - }, 1000 / 60) + + await new Promise(resolve => setTimeout(resolve, 1000 / 60)) + } disableGraphics() + + return 0 } \ No newline at end of file