diff --git a/.changes/webview-drag-client-region.md b/.changes/webview-drag-client-region.md new file mode 100644 index 000000000..4e116cdd9 --- /dev/null +++ b/.changes/webview-drag-client-region.md @@ -0,0 +1,5 @@ +--- +"wry": "patch" +--- + +On Windows, enable webview2 [non client region support](https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2settings9?view=webview2-1.0.2478.35#get_isnonclientregionsupportenabled) which allows using `app-region` CSS style. diff --git a/src/webview2/mod.rs b/src/webview2/mod.rs index fffe36401..230232cdd 100644 --- a/src/webview2/mod.rs +++ b/src/webview2/mod.rs @@ -512,6 +512,10 @@ impl InnerWebView { let settings6 = settings.cast::()?; settings6.SetIsSwipeNavigationEnabled(attributes.back_forward_navigation_gestures)?; + if let Ok(settings9) = settings.cast::() { + settings9.SetIsNonClientRegionSupportEnabled(true)?; + } + Ok(()) }