(window: &tauri::WebviewWindow)
| 89 | |
| 90 | #[cfg(target_os = "windows")] |
| 91 | fn wait_for_windows_maximize_before_show(window: &tauri::WebviewWindow) -> &'static str { |
| 92 | let started_at = Instant::now(); |
| 93 | let mut logged_error = false; |
| 94 | |
| 95 | loop { |
| 96 | match windows_maximize_show_wait_action( |
| 97 | read_windows_maximize_state(window, &mut logged_error), |
| 98 | started_at.elapsed(), |
| 99 | ) { |
| 100 | WindowsMaximizeShowWaitAction::Ready => return "ready", |
| 101 | WindowsMaximizeShowWaitAction::TimedOut => return "timeout", |
| 102 | WindowsMaximizeShowWaitAction::Sleep(duration) => std::thread::sleep(duration), |
| 103 | } |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | #[cfg(target_os = "windows")] |
| 108 | async fn wait_for_windows_maximize_before_show_async( |
no test coverage detected