MicrosoftEdge / WebView2Samples

Microsoft Edge WebView2 samples
862 stars 466 forks source link

The WebView2APISample program sometimes fails to restore the visibility of the webview correctly. #221

Open yzy opened 11 months ago

yzy commented 11 months ago

Description: When the sample application window is minimized after being maximized, the bug will reoccur. At this point, if you click on the taskbar icon or switch windows to restore the window to the foreground, the webview will still be invisible unless the window is restored from the maximized state.

Reason: There is an error in the handling branch of the WM_SIZE message in the ViewComponent::HandleWindowMessage method. The related code only checks for the SIZE_RESTORED message, but in the scenario described above, the window will receive a SIZE_MAXIMIZED message.