feat: add option to keep window on top, closes #820 (#825)

This commit is contained in:
Huang Xin
2025-04-07 14:23:46 +08:00
committed by GitHub
parent aa66ba54c5
commit 2599f40dfb
24 changed files with 74 additions and 23 deletions
+10
View File
@@ -38,6 +38,16 @@ export const tauriHandleToggleFullScreen = async () => {
await currentWindow.setFullscreen(newIsFullscreen);
};
export const tauriHandleSetAlwaysOnTop = async (isAlwaysOnTop: boolean) => {
const currentWindow = getCurrentWindow();
await currentWindow.setAlwaysOnTop(isAlwaysOnTop);
};
export const tauriGetAlwaysOnTop = async () => {
const currentWindow = getCurrentWindow();
return await currentWindow.isAlwaysOnTop();
};
export const tauriHandleOnWindowFocus = async (callback: () => void) => {
const currentWindow = getCurrentWindow();
return currentWindow.listen(TauriEvent.WINDOW_FOCUS, async () => {