Skip to content

Commit 089872b

Browse files
authored
fix: set phone-island always on top (#79)
1 parent 2134746 commit 089872b

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/main/classes/controllers/PhoneIslandController.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class PhoneIslandController {
3434
// Don't show window during warm-up
3535
if (!window.isVisible() && !this.isWarmingUp) {
3636
window.show()
37-
window.setAlwaysOnTop(true)
37+
window.setAlwaysOnTop(true, 'screen-saver')
3838
}
3939
}
4040
}
@@ -196,7 +196,7 @@ export class PhoneIslandController {
196196
const bounds = window.getBounds()
197197
if (bounds.width > 0 && bounds.height > 0) {
198198
window.show()
199-
window.setAlwaysOnTop(true)
199+
window.setAlwaysOnTop(true, 'screen-saver')
200200
Log.info('PhoneIsland window shown')
201201
}
202202
}

src/main/classes/windows/PhoneIslandWindow.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,14 @@ export class PhoneIslandWindow extends BaseWindow {
3333
nodeIntegration: true
3434
}
3535
})
36+
37+
// Set window level to ensure it appears above fullscreen applications
38+
// This works across all platforms (macOS, Windows, Linux)
39+
this.addOnBuildListener(() => {
40+
const window = this.getWindow()
41+
if (window) {
42+
window.setAlwaysOnTop(true, 'screen-saver')
43+
}
44+
})
3645
}
3746
}

0 commit comments

Comments
 (0)