From 3e432246699020a2bb01ea365ddd61a061563532 Mon Sep 17 00:00:00 2001 From: Ayaka Neko Date: Thu, 21 Aug 2025 01:38:52 +0800 Subject: [PATCH] fix(stage-tamagotchi): auto focus to prevent not selectable --- apps/stage-tamagotchi/src/stores/window-controls.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/stage-tamagotchi/src/stores/window-controls.ts b/apps/stage-tamagotchi/src/stores/window-controls.ts index 6004de257..c8fff41cc 100644 --- a/apps/stage-tamagotchi/src/stores/window-controls.ts +++ b/apps/stage-tamagotchi/src/stores/window-controls.ts @@ -1,5 +1,6 @@ import type { AiriTamagotchiEvents } from '../composables/tauri' +import { getCurrentWindow } from '@tauri-apps/api/window' import { defineStore } from 'pinia' import { onMounted, onUnmounted, ref } from 'vue' @@ -24,6 +25,9 @@ export const useWindowControlStore = defineStore('windowControl', () => { } stopClickThrough() + + const window = getCurrentWindow() + window.setFocus() } return {