mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-08-01 07:21:33 -07:00
Fix macOS overlay foreground handling and character-dictionary cache reuse (#68)
This commit is contained in:
@@ -3,6 +3,7 @@ import test from 'node:test';
|
||||
import {
|
||||
buildStatsWindowLoadFileOptions,
|
||||
buildStatsWindowOptions,
|
||||
presentStatsWindow,
|
||||
promoteStatsWindowLevel,
|
||||
resolveStatsWindowOuterBoundsForContent,
|
||||
shouldHideStatsWindowForInput,
|
||||
@@ -230,3 +231,45 @@ test('promoteStatsWindowLevel raises stats above overlay level on Windows', () =
|
||||
|
||||
assert.deepEqual(calls, ['always-on-top:true:screen-saver:2', 'move-top']);
|
||||
});
|
||||
|
||||
test('presentStatsWindow shows inactive on macOS to stay on the fullscreen mpv Space', () => {
|
||||
const calls: string[] = [];
|
||||
|
||||
presentStatsWindow(
|
||||
{
|
||||
show: () => {
|
||||
calls.push('show');
|
||||
},
|
||||
showInactive: () => {
|
||||
calls.push('show-inactive');
|
||||
},
|
||||
focus: () => {
|
||||
calls.push('focus');
|
||||
},
|
||||
} as never,
|
||||
'darwin',
|
||||
);
|
||||
|
||||
assert.deepEqual(calls, ['show-inactive']);
|
||||
});
|
||||
|
||||
test('presentStatsWindow shows and focuses on non-macOS platforms', () => {
|
||||
const calls: string[] = [];
|
||||
|
||||
presentStatsWindow(
|
||||
{
|
||||
show: () => {
|
||||
calls.push('show');
|
||||
},
|
||||
showInactive: () => {
|
||||
calls.push('show-inactive');
|
||||
},
|
||||
focus: () => {
|
||||
calls.push('focus');
|
||||
},
|
||||
} as never,
|
||||
'linux',
|
||||
);
|
||||
|
||||
assert.deepEqual(calls, ['show', 'focus']);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user