diff --git a/CefSharp.WpfExample/CefSharp.WpfExample.csproj b/CefSharp.WpfExample/CefSharp.WpfExample.csproj index 50b895e81b..8bdc6166bc 100644 --- a/CefSharp.WpfExample/CefSharp.WpfExample.csproj +++ b/CefSharp.WpfExample/CefSharp.WpfExample.csproj @@ -10,7 +10,7 @@ Properties CefSharp.WpfExample CefSharp.WpfExample - v3.5 + v4.0 512 {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 4 @@ -18,6 +18,7 @@ 3.5 + true @@ -42,6 +43,7 @@ 3.5 + 3.5 @@ -94,6 +96,7 @@ ResXFileCodeGenerator Resources.Designer.cs + SettingsSingleFileGenerator Settings.Designer.cs diff --git a/CefSharp.sln b/CefSharp.sln index 4800934b16..6c6575ccbd 100644 --- a/CefSharp.sln +++ b/CefSharp.sln @@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CefSharp.Tests", "CefSharp. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CefSharp.Example", "CefSharp.Example\CefSharp.Example.csproj", "{C043FFF7-5F71-4FFC-989A-E09E18548589}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CefSharp.WpfExample", "CefSharp.WpfExample\CefSharp.WpfExample.csproj", "{4828DAEC-EF99-4553-B674-4374F77C6D66}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -59,6 +61,16 @@ Global {C043FFF7-5F71-4FFC-989A-E09E18548589}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {C043FFF7-5F71-4FFC-989A-E09E18548589}.Release|Mixed Platforms.Build.0 = Release|Any CPU {C043FFF7-5F71-4FFC-989A-E09E18548589}.Release|Win32.ActiveCfg = Release|Any CPU + {4828DAEC-EF99-4553-B674-4374F77C6D66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4828DAEC-EF99-4553-B674-4374F77C6D66}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4828DAEC-EF99-4553-B674-4374F77C6D66}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {4828DAEC-EF99-4553-B674-4374F77C6D66}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {4828DAEC-EF99-4553-B674-4374F77C6D66}.Debug|Win32.ActiveCfg = Debug|Any CPU + {4828DAEC-EF99-4553-B674-4374F77C6D66}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4828DAEC-EF99-4553-B674-4374F77C6D66}.Release|Any CPU.Build.0 = Release|Any CPU + {4828DAEC-EF99-4553-B674-4374F77C6D66}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {4828DAEC-EF99-4553-B674-4374F77C6D66}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {4828DAEC-EF99-4553-B674-4374F77C6D66}.Release|Win32.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/CefSharp/CefFormsWebBrowser.cpp b/CefSharp/CefFormsWebBrowser.cpp index 8f8d718a41..ea7801cd65 100644 --- a/CefSharp/CefFormsWebBrowser.cpp +++ b/CefSharp/CefFormsWebBrowser.cpp @@ -130,7 +130,6 @@ namespace CefSharp GetClientRect(hWnd, &rect); windowInfo.SetAsChild(hWnd, rect); - CefBrowser::CreateBrowser(windowInfo, static_cast>(ptr), urlStr, *_settings->_browserSettings); } } diff --git a/CefSharp/CefSharp.vcxproj b/CefSharp/CefSharp.vcxproj index 7bd65fbfb0..bc673e3018 100644 --- a/CefSharp/CefSharp.vcxproj +++ b/CefSharp/CefSharp.vcxproj @@ -131,6 +131,7 @@ + @@ -144,12 +145,14 @@ + + @@ -168,6 +171,7 @@ + diff --git a/CefSharp/WpfClientAdapter.cpp b/CefSharp/WpfClientAdapter.cpp index 8730a66786..9c068a4062 100644 --- a/CefSharp/WpfClientAdapter.cpp +++ b/CefSharp/WpfClientAdapter.cpp @@ -19,12 +19,15 @@ namespace CefSharp return false; } - void WpfClientAdapter::OnPaint(CefRefPtr browser, PaintElementType type, const CefRect& dirtyRect, const void* buffer) + void WpfClientAdapter::OnPaint(CefRefPtr browser, PaintElementType type, const RectList& dirtyRects, const void* buffer) { int width, height; browser->GetSize(type, width, height); + CefRect dummy; - _wpfBrowserControl->SetBuffer(width, height, dirtyRect, buffer); + // NB: We don't actually use dirtyRect, we rerender the entire buffer + // in the SetBuffer call regardless + _wpfBrowserControl->SetBuffer(width, height, dummy, buffer); } void WpfClientAdapter::OnCursorChange(CefRefPtr browser, CefCursorHandle cursor) diff --git a/CefSharp/WpfClientAdapter.h b/CefSharp/WpfClientAdapter.h index 8151fda58a..4334fba75d 100644 --- a/CefSharp/WpfClientAdapter.h +++ b/CefSharp/WpfClientAdapter.h @@ -31,7 +31,7 @@ namespace CefSharp virtual bool GetScreenPoint(CefRefPtr browser, int viewX, int viewY, int& screenX, int& screenY) OVERRIDE; //virtual void OnPopupShow(CefRefPtr browser, bool show) OVERRIDE; //virtual void OnPopupSize(CefRefPtr browser, const CefRect& rect) OVERRIDE; - virtual void OnPaint(CefRefPtr browser, PaintElementType type, const CefRect& dirtyRect, const void* buffer) OVERRIDE; + virtual void OnPaint(CefRefPtr browser, PaintElementType type, const RectList& dirtyRects, const void* buffer) OVERRIDE; virtual void OnCursorChange(CefRefPtr browser, CefCursorHandle cursor) OVERRIDE; IMPLEMENT_LOCKING(WpfClientAdapter);