ewc
ewc copied to clipboard
Laggy dragging on 1903
Hi,
[Issue] Ewc is literally slow when dragging arcylic windows. [Tried] 1. updated to electron@latest; 2. updated to windows-build tools 2019 with 18362 SDK. [Request] If possible and willing,
- any explanation on the machanism casusing such problem;
- a more efficient module on dragging
Thanks for your efforts. :)
Well hello there, I suppose this is the same as #16. I have no idea why is this, and I cannot reproduce it, as I am on 1809 update. I'll update my windows soon and test again. Lately, windows updates break things on users machine 🤷🏻♀️
Thanks for your effort. :)
Well hello there, I suppose this is the same as #16. I have no idea why is this, and I cannot reproduce it, as I am on 1809 update. I'll update my windows soon and test again. Lately, windows updates break things on users machine 🤷🏻♀️
It turns out that it may be a bug related to mouse polling frequency on 1903. Simliar questions, explanation, ang temporary solutions here.
Unfortunately I cannot update my windows (due to windows update bugs) to that version to experience that issue. It may be fixed by Microsoft themselves.
Unfortunately I cannot update my windows (due to windows update bugs) to that version to experience that issue. It may be fixed by Microsoft themselves.
Ture and I highly recommend that DO NOT UPDATE... 😂
For me, the lag only happends when set to "arclic", but not "blur behind". No idea what causes this.
But I think a workaround is possible to fix this? Just increase the blur radius of "blur behind" (Don't know if this is possible) and add a 50% translucent black div on top of it (Tried, this can work)
No change to package.json. Windows 10 Pro 1909
For me, the lag only happends when set to "arclic", but not "blur behind". No idea what causes this.
But I think a workaround is possible to fix this? Just increase the blur radius of "blur behind" (Don't know if this is possible) and add a 50% translucent black div on top of it (Tried, this can work)
No change to package.json. Windows 10 Pro 1909
ACCENTPOLICY is provided by MS which pre-defines radius.
It seems that pack KB4541738 of Win 10 2004 fixed this bug.
Doesn't seem to have for me:
I have this fix which disables the acrylic when dragging using a debounce function. It just changes it to a blur behind when dragging, but you can do whatever you want with that:
// Debounce function:
function debounce(func, wait, immediate) {
var timeout;
return function() {
var context = this,
args = arguments;
var later = function() {
timeout = null;
if (!immediate) func.apply(context, args);
};
var callNow = immediate && !timeout;
clearTimeout(timeout);
timeout = setTimeout(later, wait);
if (callNow) func.apply(context, args);
};
}
// Functions for disable and re-enable:
const disableAcrylic = debounce(
() => {
ewc.setBlurBehind(win, 0xdd222222);
},
50,
true
);
const enableAcrylic = debounce(() => {
ewc.setAcrylic(win, 0xbb000000);
}, 50);
enableAcrylic();
// Event listeners:
win.on("move", () => {
disableAcrylic();
enableAcrylic();
});
win.on("resize", () => {
disableAcrylic();
enableAcrylic();
});
Search up js debounce function to see how that part works.
I have found a 2 click solution for this issue in the meantime. toggling off the "show windows content while dragging" toggle item in the Windows visual performance removed whatever causes this. Video attached to show the effects clearly.
https://user-images.githubusercontent.com/87094644/124820320-7b3e9500-dfac-11eb-9e1a-e78933cba591.mp4
i have this issue on my desktop but not on my laptop. have tried setting the polling frequency to match my laptop mouse, but although this helps a little it's still pretty bad.
disabling transparency effects (settings > personalization > colors), seems to be another work around for the problem. Though a big downside is you lose all the nice acrylic transparency from windows ( taskbar & wt terminal).
Supposedly fixed in Windows 11: https://forum.obsidian.md/t/translucent-window-setting-results-in-increasingly-laggy-window-drag-movements-as-mouse-polling-frequency-increases/6829/34