Skip to content

Commit b3e6b0d

Browse files
authored
Merge pull request #20433 from unoplatform/mergify/bp/release/stable/6.0/pr-20388
fix(webview): avoid flickering on webview initialization on win32 (backport #20388)
2 parents d999d8d + 3968c6d commit b3e6b0d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Uno.UI.Runtime.Skia.Win32/Win32NativeWebView.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public Win32NativeWebView(CoreWebView2 owner, ContentPresenter presenter)
100100
}
101101
_webViewForNextCreateWindow = null;
102102

103-
_ = PInvoke.ShowWindow(_hwnd, SHOW_WINDOW_CMD.SW_SHOWNORMAL);
103+
_ = PInvoke.ShowWindow(_hwnd, SHOW_WINDOW_CMD.SW_MINIMIZE);
104104

105105
if (_hwnd == HWND.Null)
106106
{
@@ -112,8 +112,6 @@ public Win32NativeWebView(CoreWebView2 owner, ContentPresenter presenter)
112112
this.Log().Trace("Created web view window.");
113113
}
114114

115-
Win32Host.RegisterWindow(_hwnd);
116-
117115
var success = PInvoke.RegisterTouchWindow(_hwnd, 0);
118116
if (!success && this.Log().IsEnabled(LogLevel.Error))
119117
{
@@ -182,8 +180,6 @@ private EventHandler<T> EventHandlerBuilder<T>(Action<Win32NativeWebView, object
182180
{
183181
_hwndToWebView.Remove(_hwnd);
184182
}
185-
186-
Win32Host.UnregisterWindow(_hwnd);
187183
});
188184
}
189185

0 commit comments

Comments
 (0)