From 64afc7b147d030a4451263aa116493eceb10c94c Mon Sep 17 00:00:00 2001 From: Max Katz Date: Thu, 13 Aug 2026 19:59:19 -0700 Subject: [PATCH] Fix WS_EX_TRANSPARENT using XOR instead AND NOT --- src/Avalonia.Controls.WebView.Core/Win/WindowsUtility.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Avalonia.Controls.WebView.Core/Win/WindowsUtility.cs b/src/Avalonia.Controls.WebView.Core/Win/WindowsUtility.cs index 442d151..210eead 100644 --- a/src/Avalonia.Controls.WebView.Core/Win/WindowsUtility.cs +++ b/src/Avalonia.Controls.WebView.Core/Win/WindowsUtility.cs @@ -18,8 +18,8 @@ public static void MakeHwndTransparent(IntPtr hwnd) // This combination ensures: // 1. WS_EX_TRANSPARENT: Makes the window visually transparent but still blocks content from behind the application // 2. Removing WS_EX_LAYERED: Prevents the window from creating its own compositing surface with default black background - PInvoke.SetWindowLong(p, WINDOW_LONG_PTR_INDEX.GWL_EXSTYLE, - (exStyle | (int)0x00000020L) ^ (int)0x00080000L); + PInvoke.SetWindowLong(p, WINDOW_LONG_PTR_INDEX.GWL_EXSTYLE, + (exStyle | (int)0x00000020L) & ~(int)0x00080000L); } internal static StandardCursorType MapCursor(uint systemCursorId)