hotfix: fix window cannot be dragged when light traffic widget is shown on macOS (#304)
* fix: fix window cannot be dragged when light traffic widget is shown on macOS * fix: detecting tauri focus event for deeplink redirect in oauth * release: version 0.9.9
This commit is contained in:
@@ -24,3 +24,12 @@ export const tauriHandleOnCloseWindow = async (callback: () => void) => {
|
||||
await exit(0);
|
||||
});
|
||||
};
|
||||
|
||||
export const tauriHandleOnWindowFocus = async (callback: () => void) => {
|
||||
const { TauriEvent } = await import('@tauri-apps/api/event');
|
||||
const { getCurrentWindow } = await import('@tauri-apps/api/window');
|
||||
const currentWindow = getCurrentWindow();
|
||||
return currentWindow.listen(TauriEvent.WINDOW_FOCUS, async () => {
|
||||
await callback();
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user