From c0278d83f93d8ee18d1e9eeee88e71d84c12357a Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Tue, 7 Nov 2023 06:22:57 +0200 Subject: [PATCH] fix(windows): remove `WS_CLIPCHILDREN` from window style (#839) While working on https://github.com/tauri-apps/wry/pull/1041 which allows adding the webview as a child window, I noticed that when setting the webview to be transparent, the portion of the parent behind it doesn't render properly and that was because of `WS_CLIPCHILDREN` --- .changes/windows-ws-clipchildren.md | 5 +++++ src/platform_impl/windows/window_state.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changes/windows-ws-clipchildren.md diff --git a/.changes/windows-ws-clipchildren.md b/.changes/windows-ws-clipchildren.md new file mode 100644 index 000000000..520723863 --- /dev/null +++ b/.changes/windows-ws-clipchildren.md @@ -0,0 +1,5 @@ +--- +"tao": "patch" +--- + +On Windows, remove `WS_CLIPCHILDREN` from window style diff --git a/src/platform_impl/windows/window_state.rs b/src/platform_impl/windows/window_state.rs index 89b603107..5d5c96b6e 100644 --- a/src/platform_impl/windows/window_state.rs +++ b/src/platform_impl/windows/window_state.rs @@ -231,7 +231,7 @@ impl WindowFlags { pub fn to_window_styles(self) -> (WINDOW_STYLE, WINDOW_EX_STYLE) { let (mut style, mut style_ex) = (Default::default(), Default::default()); - style |= WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_SYSMENU | WS_CAPTION; + style |= WS_CLIPSIBLINGS | WS_SYSMENU | WS_CAPTION; style_ex |= WS_EX_ACCEPTFILES | WS_EX_WINDOWEDGE; if self.contains(WindowFlags::RESIZABLE) {