Skip to content

Commit bc6b7b5

Browse files
committed
Fix: not visible on top of full-screen apps
reference electron/electron#10078
1 parent a8685cd commit bc6b7b5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/main-window.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { join } from 'node:path'
2-
import { shell, BrowserWindow } from 'electron'
2+
import { shell, app, BrowserWindow } from 'electron'
33
import { is } from '@electron-toolkit/utils'
44
import icon from '../../resources/icon.png?asset'
55

@@ -30,6 +30,9 @@ export function createWindow(): void {
3030

3131
mainWindow.on('ready-to-show', () => {
3232
mainWindow.show()
33+
mainWindow.setAlwaysOnTop(true, 'screen-saver', 1)
34+
mainWindow.setVisibleOnAllWorkspaces(true, { visibleOnFullScreen: true })
35+
app.dock?.show()
3336
mainWindow.setContentProtection(true)
3437
})
3538

0 commit comments

Comments
 (0)