desktop open: Windows window check uses real top-level windows (the tray helper windows and MainWindowHandle also answer for a hidden app)

This commit is contained in:
CRTkafa 2026-10-23 22:48:02 +08:00
parent 8df41a26b0
commit 4dff7d9b2e
2 changed files with 15 additions and 2 deletions

View file

@ -92,7 +92,7 @@ describe('desktop open: a hidden tray copy that is already running', () => {
expect(openState('win32', [rows[0]!], true)).toBe('hidden');
expect(openState('win32', rows, false)).toBe('ok');
expect(openState('win32', [], true)).toBe('none');
expect(listCommand('win32').join(' ')).toContain('MainWindowHandle');
expect(listCommand('win32').join(' ')).toContain('IsWindowVisible');
});
test('elsewhere: a visible start, or a hidden copy the new start handed over to', () => {
expect(openState('linux', [hidden], false)).toBe('hidden');