How to stop rendering

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.

How to stop rendering

Postby amitkanfer » Wed Aug 27, 2014 5:38 am

Hi guys,
Is there any elegant way to "stop" rendering of the off screen browser?
assuming a site that has some javascript 'ticker' or some sort of animation...
after some time - if i notice that the user is not in front of the browser - how can i stop getting the "OnPaint" callbacks?
or better - how to stop the whole rendering process??

and is it possible to resume it later on?

thanks alot!

Amit
amitkanfer
Techie
 
Posts: 31
Joined: Mon Jul 21, 2014 4:10 am

Re: How to stop rendering

Postby magreenblatt » Wed Aug 27, 2014 3:50 pm

Use CefBrowserHost::WasHidden.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: How to stop rendering

Postby amitkanfer » Thu Aug 28, 2014 4:01 am

Thanks alot!
exactly what i was looking for.
amitkanfer
Techie
 
Posts: 31
Joined: Mon Jul 21, 2014 4:10 am

Re: How to stop rendering

Postby amitkanfer » Sun Aug 31, 2014 9:00 am

Marshall,
Is it possible that the "WasHidden" API has been broken on branch 2062? I'm keep getting OnPaint events.
In branch 1916 it works perfectly...

Is that a known issue?

Thanks,
Amit
amitkanfer
Techie
 
Posts: 31
Joined: Mon Jul 21, 2014 4:10 am

Re: How to stop rendering

Postby magreenblatt » Sun Aug 31, 2014 11:34 am

Please add a bug to the issue tracker.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 69 guests