mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-08-18 00:21:41 -07:00
fix(overlay): prevent Windows mouse lag during click-through tracking (#201)
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
|
||||
import { applyOverlayClickThrough } from './overlay-click-through';
|
||||
|
||||
test('applyOverlayClickThrough requests forwarding only off Windows', () => {
|
||||
const calls: Array<{ ignore: boolean; forward: boolean }> = [];
|
||||
const window = {
|
||||
setIgnoreMouseEvents: (ignore: boolean, options?: { forward?: boolean }) => {
|
||||
calls.push({ ignore, forward: options?.forward === true });
|
||||
},
|
||||
};
|
||||
|
||||
applyOverlayClickThrough(window, true);
|
||||
applyOverlayClickThrough(window, false);
|
||||
|
||||
assert.deepEqual(calls, [
|
||||
{ ignore: true, forward: false },
|
||||
{ ignore: true, forward: true },
|
||||
]);
|
||||
});
|
||||
Reference in New Issue
Block a user