File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -469,7 +469,7 @@ namespace CefSharp
469469 *(CefBrowserSettings*) browserSettings->_internalBrowserSettings , NULL );
470470 }
471471
472- void OnSizeChanged (IntPtr^ sourceHandle)
472+ void OnPaint (IntPtr^ sourceHandle)
473473 {
474474 HWND hWnd = static_cast <HWND>(sourceHandle->ToPointer ());
475475 RECT rect;
Original file line number Diff line number Diff line change @@ -59,13 +59,6 @@ public ChromiumWebBrowser(string address)
5959 Paint += OnPaint ;
6060 }
6161
62- private void OnPaint ( object sender , PaintEventArgs e )
63- {
64- // Size is 0x0 when we are on a modeless Form which is minimized.
65- if ( ! Size . IsEmpty && managedCefBrowserAdapter != null )
66- managedCefBrowserAdapter . OnSizeChanged ( Handle ) ;
67- }
68-
6962 protected override void Dispose ( bool disposing )
7063 {
7164 Paint -= OnPaint ;
@@ -352,5 +345,14 @@ public Task<string> GetTextAsync()
352345 managedCefBrowserAdapter . GetText ( taskStringVisitor ) ;
353346 return taskStringVisitor . Task ;
354347 }
348+
349+ private void OnPaint ( object sender , PaintEventArgs e )
350+ {
351+ // Size is 0x0 when we are on a modeless Form which is minimized.
352+ if ( ! Size . IsEmpty && managedCefBrowserAdapter != null )
353+ {
354+ managedCefBrowserAdapter . OnPaint ( Handle ) ;
355+ }
356+ }
355357 }
356358}
You can’t perform that action at this time.
0 commit comments