mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 22:55:48 +01:00
Addresses the issue where application windows fail to show on Windows 10 Pro due to efficiency mode preventing WebView2 NavigationCompleted events. ## Changes Made ### Windows (webview_window_windows.go) - **Decouple window container from WebView state**: Window now shows immediately - **Add timeout fallback**: 3-second timeout to show WebView if navigation is delayed - **Prevent efficiency mode**: Set WebView2 IsVisible=true per Microsoft recommendation - **Enhanced state tracking**: Added showRequested, visibilityTimeout, windowShown fields - **Robust navigation completion**: Improved handler to work with new visibility logic ### macOS (webview_window_darwin.go) - **Documentation**: Added comment noting macOS already follows best practices - **No functional changes**: macOS implementation already robust ### Linux (webview_window_linux.go, linux_cgo.go, linux_purego.go) - **Add missing methods**: Implemented show()/hide() methods in main Linux file - **CGO implementation**: Added windowShow()/windowHide() delegation methods - **Purego implementation**: Added windowShow()/windowHide() methods for purego builds - **Consistent behavior**: Matches CGO implementation with position saving ## Implementation Pattern Adopts the following pattern: 1. **Separate concerns**: Window container vs WebView content readiness 2. **Immediate visibility**: Show window container immediately 3. **Progressive enhancement**: Show WebView content when ready 4. **Robust fallbacks**: Timeout and multiple strategies for edge cases ## Testing Considerations - Windows 10 Pro efficiency mode scenarios - WebView2 navigation delays or failures - Cross-platform consistency - Performance impact of timeout mechanisms Fixes #2861 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| .vscode | ||
| public | ||
| src | ||
| .gitignore | ||
| .npmrc | ||
| astro.config.mjs | ||
| CNAME | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| Taskfile.yml | ||
| tsconfig.json | ||
Starlight Starter Kit: Basics
npm create astro@latest -- --template starlight
🧑🚀 Seasoned astronaut? Delete this file. Have fun!
🚀 Project Structure
Inside of your Astro + Starlight project, you'll see the following folders and files:
.
├── public/
├── src/
│ ├── assets/
│ ├── content/
│ │ ├── docs/
│ │ └── config.ts
│ └── env.d.ts
├── astro.config.mjs
├── package.json
└── tsconfig.json
Starlight looks for .md or .mdx files in the src/content/docs/ directory.
Each file is exposed as a route based on its file name.
Images can be added to src/assets/ and embedded in Markdown with a relative
link.
Static assets, like favicons, can be placed in the public/ directory.
🧞 Commands
All commands are run from the root of the project, from a terminal:
| Command | Action |
|---|---|
npm install |
Installs dependencies |
npm run dev |
Starts local dev server at localhost:4321 |
npm run build |
Build your production site to ./dist/ |
npm run preview |
Preview your build locally, before deploying |
npm run astro ... |
Run CLI commands like astro add, astro check |
npm run astro -- --help |
Get help using the Astro CLI |
👀 Want to learn more?
Check out Starlight’s docs, read the Astro documentation, or jump into the Astro Discord server.