[FIXED] Render problem - white window

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

[FIXED] Render problem - white window

Postby szulak » Thu Apr 17, 2014 6:37 am

Hello,

I am having a trouble with showing main window just after CEF has finished loading url. I am creating a main window, and calling ShowWindow(SW_HIDE) on it. Later, in CefLoadHandler::OnLoadEnd() method, I am sending an event to notify main window, that loading page has finished, and it's ready to "appear" for user. Here is a code (it's MFC project):

Code: Select all
void CMainWindow::handlePageLoaded(...)
{   
   ShowWindow(SW_SHOW);
   UpdateWindow();
}


As soon as "UpdateWindow();" is reached, the main window is either loaded with blank white page, or with loaded page. It's completely random. Does anyone have any idea, what might cause this problem? It's worth to mention, that CEF window is wrapped into standalone control (it inherits from CWnd), and CMainWindow has this control as a member.

Regards,
szulak
Last edited by szulak on Thu Jun 05, 2014 2:57 am, edited 1 time in total.
szulak
Newbie
 
Posts: 7
Joined: Mon Feb 10, 2014 8:54 am
Location: Warsaw, Poland

Re: Render problem - white window

Postby magreenblatt » Thu Apr 17, 2014 8:12 am

What CEF version?
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Render problem - white window

Postby Liosan » Tue Apr 22, 2014 4:43 am

Hi,

We are using CEF version 3.1650.1562_windows32.

Liosan
Liosan
Techie
 
Posts: 14
Joined: Tue Apr 22, 2014 3:49 am

Re: Render problem - white window

Postby magreenblatt » Tue Apr 22, 2014 10:01 am

Are you sure OnLoadEnd is being called? You might have better results using OnLoadingStateChange.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Render problem - white window

Postby Liosan » Wed Apr 23, 2014 2:09 am

magreenblatt wrote:Are you sure OnLoadEnd is being called?


Yes, sure:
szulak wrote:As soon as "UpdateWindow();" is reached, the main window is either loaded with blank white page, or with loaded page.

This happens after OnLoadEnd(). We even had some logs to confirm it :)


magreenblatt wrote:You might have better results using OnLoadingStateChange.

How is this different? Is OnLoadEnd broken?

Liosan
Liosan
Techie
 
Posts: 14
Joined: Tue Apr 22, 2014 3:49 am

Re: Render problem - white window

Postby magreenblatt » Wed Apr 23, 2014 10:27 am

Liosan wrote:How is this different? Is OnLoadEnd broken?

See https://code.google.com/p/chromiumembed ... il?id=1050.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Render problem - white window

Postby szulak » Tue May 06, 2014 9:29 am

magreenblatt wrote:
Liosan wrote:How is this different? Is OnLoadEnd broken?

See https://code.google.com/p/chromiumembed ... il?id=1050.


Unfortunately, it doesn't solve our problem. In our case, OnLoadEnd() handler is being called, but there is some rendering problem - CEF's window is white, but as soon as I move a mouse cursor above any element of website, the CEF's window is redrawn correctly.

Moreover, I have got another question: is it possible to show second CEF's window above first one?

Thank you for answer,
szulak
szulak
Newbie
 
Posts: 7
Joined: Mon Feb 10, 2014 8:54 am
Location: Warsaw, Poland

Re: Render problem - white window

Postby magreenblatt » Tue May 06, 2014 10:10 am

szulak wrote:is it possible to show second CEF's window above first one?

Yes, it's possible.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Render problem - white window

Postby szulak » Wed May 28, 2014 3:21 am

Hello,

We are having the same issue still. Here is window (white content is a CEF window with loaded page). Does anyone have any idea how can I debug / fix it? Below a screenshot of loaded CEF window. We are using CEF version 3.1650.1562_windows32, problem appears on Windows 8.1.

Image

Best regards,
szulak
szulak
Newbie
 
Posts: 7
Joined: Mon Feb 10, 2014 8:54 am
Location: Warsaw, Poland

Re: Render problem - white window

Postby szulak » Thu Jun 05, 2014 2:56 am

hello,

we have finally fixed this issue (which was not related to CEF itself). The following line added to OnBeforeCommandLineProcessing handler made it work:

Code: Select all
command_line->AppendSwitch("disable-gpu");


regards,
szulak
szulak
Newbie
 
Posts: 7
Joined: Mon Feb 10, 2014 8:54 am
Location: Warsaw, Poland


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 66 guests