[Desktop] Use Window Controls Overlay API (#2316)

Co-authored-by: huchenlei <huchenlei@proton.me>
This commit is contained in:
filtered
2025-01-23 05:22:21 +11:00
committed by GitHub
parent 8f6b594a9f
commit c7bce87b8d
4 changed files with 25 additions and 12 deletions

View File

@@ -14,3 +14,7 @@ export function electronAPI() {
export function showNativeMenu(event: MouseEvent) {
electronAPI()?.showContextMenu(event as ElectronContextMenuOptions)
}
export function isNativeWindow() {
return isElectron() && !!window.navigator.windowControlsOverlay?.visible
}