Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CefSharp.Core/CefSharp.Core.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@
<ClInclude Include="Internals\MCefRefPtr.h" />
<ClInclude Include="Internals\RenderClientAdapter.h" />
<ClInclude Include="Internals\StringVisitor.h" />
<ClInclude Include="PaintElementType.h" />
<ClInclude Include="PaintElementType.h" />
<ClInclude Include="MouseButtonType.h" />
<ClInclude Include="ManagedCefBrowserAdapter.h" />
<ClInclude Include="CefSettings.h" />
Expand Down
18 changes: 9 additions & 9 deletions CefSharp.Core/ManagedCefBrowserAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ namespace CefSharp
}
}

void Invalidate(PaintElementType type)
{
auto cefHost = _renderClientAdapter->TryGetCefHost();
void Invalidate(PaintElementType type)
{
auto cefHost = _renderClientAdapter->TryGetCefHost();

if (cefHost != nullptr)
{
cefHost->Invalidate((CefBrowserHost::PaintElementType)type);
}
}
if (cefHost != nullptr)
{
cefHost->Invalidate((CefBrowserHost::PaintElementType)type);
}
}

void SendFocusEvent(bool isFocused)
{
Expand Down Expand Up @@ -202,7 +202,7 @@ namespace CefSharp
void OnMouseButton(int x, int y, MouseButtonType mouseButtonType, bool mouseUp, int clickCount, CefEventFlags modifiers)
{
auto cefHost = _renderClientAdapter->TryGetCefHost();

if (cefHost != nullptr)
{
CefMouseEvent mouseEvent;
Expand Down
3 changes: 1 addition & 2 deletions CefSharp.Core/MouseButtonType.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ namespace CefSharp
{
Left = CefBrowserHost::MouseButtonType::MBT_LEFT,
Middle = CefBrowserHost::MouseButtonType::MBT_MIDDLE,
Right = CefBrowserHost::MouseButtonType::MBT_RIGHT,
Blabla
Right = CefBrowserHost::MouseButtonType::MBT_RIGHT
};
}
12 changes: 6 additions & 6 deletions CefSharp.Core/PaintElementType.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Copyright 2010-2014 The CefSharp Authors. All rights reserved.
// Copyright (c) 2010-2014 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

#include "include/cef_browser.h"

namespace CefSharp
{
public enum class PaintElementType
{
View = CefBrowserHost::PaintElementType::PET_VIEW,
Popup = CefBrowserHost::PaintElementType::PET_POPUP
};
public enum class PaintElementType
{
View = CefBrowserHost::PaintElementType::PET_VIEW,
Popup = CefBrowserHost::PaintElementType::PET_POPUP
};
}
11 changes: 8 additions & 3 deletions CefSharp.Wpf/ChromiumWebBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,6 @@ private void OnIsVisibleChanged(object sender, DependencyPropertyChangedEventArg

var isVisible = (bool)args.NewValue;
managedCefBrowserAdapter.WasHidden(!isVisible);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you can see here WasHidden has been added recently.

Need to investigate further, I think they likely achieve the same result.


if (isVisible)
managedCefBrowserAdapter.Invalidate(PaintElementType.View);
}

private static void OnApplicationExit(object sender, ExitEventArgs e)
Expand Down Expand Up @@ -1291,5 +1288,13 @@ public void AddWordToDictionary(string word)
managedCefBrowserAdapter.AddWordToDictionary(word);
}

// Invalidate the view. The browser will call CefRenderHandler::OnPaint
// asynchronously. This method is only used when window rendering is
// disabled.
public void Invalidate(PaintElementType type)
{
managedCefBrowserAdapter.Invalidate(type);
}

}
}
6 changes: 3 additions & 3 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param(
[Parameter(Position = 0)]
[string] $Target = "nupkg",
[Parameter(Position = 1)]
[string] $Version = "39.0.0-pre01-MB3",
[string] $Version = "39.0.0-pre01",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert changes to this file.

[Parameter(Position = 2)]
[string] $AssemblyVersion = "39.0.0",
[Parameter(Position = 3)]
Expand Down Expand Up @@ -284,8 +284,8 @@ WriteAssemblyVersion
switch -Exact ($Target) {
"nupkg"
{
VSX v120
#VSX v110
#VSX v120
VSX v110
Nupkg
}
"nupkg-only"
Expand Down