Skip to content

Commit

Permalink
fix(windows): remove WS_CLIPCHILDREN from window style
Browse files Browse the repository at this point in the history
While working on tauri-apps/wry#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`
  • Loading branch information
amrbashir committed Nov 6, 2023
1 parent 498ba55 commit c423c62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/windows-ws-clipchildren.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"tao": "patch"
---

On Windows, remove `WS_CLIPCHILDREN` from window style
2 changes: 1 addition & 1 deletion src/platform_impl/windows/window_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c423c62

Please sign in to comment.