CEF view lags on parent window resize

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

CEF view lags on parent window resize

Postby shmishra » Fri Feb 16, 2024 8:09 am

I am using CEF as the UI framework in my app, but I have started observing some issues/lag with the window resize workflow.
I’ve noticed that after repeatedly resizing the main app window when I release the pointer, the content within the CEF window continues to follow the resizing path and takes 2-3 seconds to adjust to the final window size.

This issue is being observed on MacOS as well as Windows. On trying out older versions of CEF, I observed that the issue doesn't happen in version 88.0.4324.182, am not sure what changed since then which is causing this behavior. Is there any flag or CEF setting I could look into to fix this behavior? or any other suggestions would be helpful.

I have attached a video of the CEF client app showing this issue.
Attachments
cefclient-resize-lag.gif
CEFClient app jittery resize behavior
cefclient-resize-lag.gif (967.28 KiB) Viewed 1509 times
shmishra
Techie
 
Posts: 10
Joined: Mon Jan 23, 2017 7:13 am

Re: CEF view lags on parent window resize

Postby magreenblatt » Fri Feb 16, 2024 10:27 am

This is substantially improved if you use the CEF Views framework (e.g. CefWindow, CefBrowserView, etc). Pass the "--use-views" command-line flag to CEF sample apps for example usage.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CEF view lags on parent window resize

Postby shmishra » Wed Feb 28, 2024 8:05 am

Thanks @magreenblatt! After trying out the CEF Views framework, I could see good improvement in the resize response of the App. But in my product, I need to have some customization in the way I use CEF view and the main window e.g., I need to have a title-barless window, and also need to load multiple CEF browser view instances in the same window (like multiple tabs in the window).
Is there a way I could achieve these with the new CEF Views framework?
shmishra
Techie
 
Posts: 10
Joined: Mon Jan 23, 2017 7:13 am

Re: CEF view lags on parent window resize

Postby magreenblatt » Wed Feb 28, 2024 11:50 am

I need to have a title-barless window

You can create a frameless CefWindow, implement CefWindowDelegate::IsFrameless.

need to load multiple CEF browser view instances in the same window (like multiple tabs in the window)

You can add multiple CefBrowserView in the same CefWindow (with Alloy runtime). You can also implement a tab strip using CefButton (e.g. clicking a button swaps the visible CefBrowserView).
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CEF view lags on parent window resize

Postby shmishra » Fri Mar 01, 2024 12:28 am

Can you please share some documentation or details about what is different in the new CefView framework in terms of the window properties? Maybe I can port those properties to my custom window to achieve a similar resize performance. I am interested in this because I already have custom window implementation using the older non-CefViews framework that will have to be migrated.
shmishra
Techie
 
Posts: 10
Joined: Mon Jan 23, 2017 7:13 am

Re: CEF view lags on parent window resize

Postby magreenblatt » Fri Mar 01, 2024 11:26 am

The only known way to resolve this issue is by using the Views framework.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to CEF Discussion

Who is online

Users browsing this forum: Majestic-12 [Bot] and 144 guests

cron