mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
First attempt at a fix for #522 - this is a hack.
Keeping track for future reference
This commit is contained in:
@@ -19,8 +19,6 @@ namespace CefSharp.WinForms.Example.Minimal
|
||||
Text = "CefSharp";
|
||||
WindowState = FormWindowState.Maximized;
|
||||
|
||||
CreateBrowser();
|
||||
|
||||
var bitness = Environment.Is64BitProcess ? "x64" : "x86";
|
||||
var version = String.Format("Chromium: {0}, CEF: {1}, CefSharp: {2}, Environment: {3}", Cef.ChromiumVersion, Cef.CefVersion, Cef.CefSharpVersion, bitness);
|
||||
DisplayOutput(version);
|
||||
@@ -28,6 +26,13 @@ namespace CefSharp.WinForms.Example.Minimal
|
||||
//Only perform layout when control has completly finished resizing
|
||||
ResizeBegin += (s, e) => SuspendLayout();
|
||||
ResizeEnd += (s, e) => ResumeLayout(true);
|
||||
|
||||
Load += OnLoad;
|
||||
}
|
||||
|
||||
private void OnLoad(object sender, EventArgs e)
|
||||
{
|
||||
CreateBrowser();
|
||||
}
|
||||
|
||||
private void CreateBrowser()
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
@@ -353,6 +354,9 @@ namespace CefSharp.WinForms
|
||||
|
||||
private void OnPaint(object sender, PaintEventArgs e)
|
||||
{
|
||||
//HACK: Temp fix for #522
|
||||
Thread.Sleep(50);
|
||||
|
||||
// Size is 0x0 when we are on a modeless Form which is minimized.
|
||||
if (!Size.IsEmpty && managedCefBrowserAdapter != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user