From b6a9fbef370ad95c42593859d2d1e25ec3d97e5c Mon Sep 17 00:00:00 2001 From: CDHJS <44164957+CDHJS@users.noreply.github.com> Date: Wed, 8 Jan 2025 22:07:10 +0800 Subject: [PATCH] refactor: WM_WINDOWPOSCHANGED to handle WM_MOVE and WM_MOVING for WebView2 --- src/webview2/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webview2/mod.rs b/src/webview2/mod.rs index ca4bb96c7..ca3c1074d 100644 --- a/src/webview2/mod.rs +++ b/src/webview2/mod.rs @@ -1155,7 +1155,7 @@ impl InnerWebView { let _ = (*controller).MoveFocus(COREWEBVIEW2_MOVE_FOCUS_REASON_PROGRAMMATIC); } - WM_WINDOWPOSCHANGED => { + msg if msg == WM_MOVE || msg == WM_MOVING => { let controller = dwrefdata as *mut ICoreWebView2Controller; let _ = (*controller).NotifyParentWindowPositionChanged(); }