File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed
Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change 11import { invoke } from "@tauri-apps/api" ;
22import {
33 appWindow ,
4+ LogicalPosition ,
45 LogicalSize ,
56 type PhysicalSize ,
67} from "@tauri-apps/api/window" ;
@@ -164,6 +165,17 @@ const App = memo(() => {
164165 initializeApp ( ) ;
165166 setupGameMonitoring ( ) ;
166167
168+ if ( IN_GAME ) {
169+ setInterval ( async ( ) => {
170+ appWindow . setPosition ( new LogicalPosition ( - 15000 , - 15000 ) ) ;
171+
172+ const visible = await appWindow . isVisible ( ) ;
173+ if ( ! visible ) {
174+ appWindow . show ( ) ;
175+ }
176+ } , 100 ) ;
177+ }
178+
167179 return ( ) => {
168180 killResizeListener ?.( ) ;
169181 if ( processCheckInterval . current ) {
@@ -174,20 +186,8 @@ const App = memo(() => {
174186
175187 const handleLoadingEnd = useCallback ( async ( ) => {
176188 const endTimer = PerformanceMonitor . time ( "loading-end" ) ;
177-
178- try {
179- const targetSize = mainWindowSize . current || new LogicalSize ( 1000 , 700 ) ;
180-
181- await Promise . all ( [
182- appWindow . setResizable ( true ) ,
183- appWindow . setSize ( targetSize ) ,
184- appWindow . center ( ) ,
185- ] ) ;
186-
187- setLoading ( false ) ;
188- } finally {
189- endTimer ( ) ;
190- }
189+ setLoading ( false ) ;
190+ endTimer ( ) ;
191191 } , [ ] ) ;
192192
193193 const appStyle = useMemo (
You can’t perform that action at this time.
0 commit comments