wails/v3/pkg
Lea Anthony d03a63e1b7 fix: Implement robust cross-platform window visibility fallback for issue #2861
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>
2025-06-14 12:59:44 +10:00
..
application fix: Implement robust cross-platform window visibility fallback for issue #2861 2025-06-14 12:59:44 +10:00
events Fix event generation issues. 2025-05-31 17:13:54 +10:00
icons [v3 windows] Small icon updates 2023-06-10 10:19:33 +10:00
mac [v3] Add start_at_login plugin 2023-04-05 21:22:02 +10:00
services Add Linux stubs for badge service and fix capabilities compilation 2025-06-11 23:45:34 +10:00
w32 extract taskbar 2025-04-26 18:48:27 -07:00