Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #553 by handling Initial resize and OnSizeChanged #618

Merged
merged 5 commits into from
Nov 19, 2014

Conversation

sylvain-hamel
Copy link
Contributor

This fixes two things:

1st, After re-sizing sometimes the browser does not react correctly. Changed from handling/forcing OnPaint to handling OnSizeChanged.

2nd, #553 : The line added to CefSharp.WinForms.Example\BrowserForm.cs causes the bug. The call to Resize() inside IWebBrowserInternal.OnInitialized fixes it.

{
// Size is 0x0 when we are on a modeless Form which is minimized.
if (!Size.IsEmpty && managedCefBrowserAdapter != null)
Copy link
Member

Choose a reason for hiding this comment

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

I believe in a few rare cases that OnSizeChanged was being called even whilst disposal was happening, so we'll likely still need the managedCefBrowserAdapter != null check.

@amaitland
Copy link
Member

Looks promising, the basics seem to be working

  • Resize
  • Minimize/Maximize
  • Tabs appear to be rendering correctly.

Few minor tweaks and I think this can be merged 👍

@amaitland amaitland added this to the 37.0.0 milestone Nov 19, 2014
@sylvain-hamel
Copy link
Contributor Author

done

amaitland added a commit that referenced this pull request Nov 19, 2014
fix #553 by handling Initial resize and OnSizeChanged
@amaitland amaitland merged commit fb32587 into cefsharp:master Nov 19, 2014
@amaitland
Copy link
Member

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants