cefsharp / CefSharp

.NET (WPF and Windows Forms) bindings for the Chromium Embedded Framework
http://cefsharp.github.io/
Other
9.88k stars 2.92k forks source link

Release Notification - 128.4.x #4934

Closed amaitland closed 1 month ago

amaitland commented 2 months ago

Release 128.4.x

amaitland commented 2 months ago

The Alloy Bootstrap has been removed (#4795)

There are multiple breaking changes. https://github.com/cefsharp/CefSharp/commit/19739abd9cc69529ecd06e86400e6f1068f14e6c

kpreisser commented 1 month ago

Hi @amaitland, thanks for your work on releasing the new version!

I noticed that when using CefSharp.Wpf.HwndHost 127.3.50 together with the new version CefSharp.Common.NETCore 128.4.90, the Chrome style is always used for the ChromiumWebBrowser, e.g. the context menu shows entries for opening the developer tools, and new windows will have the full chrome appearance. This happens even when setting CefSharpSettings.RuntimeStyle = CefRuntimeStyle.Alloy.

I noticed this seems to be because ChromiumWebBrowser.CreateBrowserWindowInfo() in CefSharp.Wpf.HwndHost doesn't set the IWindowInfo.RuntimeStyle property:

        protected virtual IWindowInfo CreateBrowserWindowInfo(IntPtr handle)
        {
            var windowInfo = new WindowInfo();
            windowInfo.SetAsChild(handle);

            if (!ActivateBrowserOnCreation)
            {
                //Disable Window activation by default
                //https://bitbucket.org/chromiumembedded/cef/issues/1856/branch-2526-cef-activates-browser-window
                windowInfo.ExStyle |= WS_EX_NOACTIVATE;
            }

            return windowInfo;
        }

whereas e.g. the WinForms ChromiumWebBrowser sets it: https://github.com/cefsharp/CefSharp/blob/53d551f541b4cf7412bc38b45f2fa43255f5d837/CefSharp.WinForms/ChromiumWebBrowser.cs#L654-L668

Is this something that needs to be done for a new CefSharp.Wpf.HwndHost release? (In the meanwhile, I created a subclass of ChromiumWebBrowser in our application that overrides CreateBrowserWindowInfo and sets the runtime style, and now the alloy style is correctly used.)

Thanks!

amaitland commented 1 month ago

Is this something that needs to be done for a new CefSharp.Wpf.HwndHost release?

Yep, that was the plan. Change made in commit https://github.com/cefsharp/CefSharp.Wpf.HwndHost/commit/0be680203ecb89db86bd1ea94ba5d1d881ca8f26

New build of HwndHost is now out. Thanks for the reminder.

Anything that's inconsistent or a change you'd like to propose then feel free to submit a PR 👍

Happy to take feedback from the community 😄

kpreisser commented 1 month ago

Thanks!