Browser Window Not Resizing in 4324 Branch on Linux

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.

Re: Browser Window Not Resizing in 4324 Branch on Linux

Postby salvadordf » Sat Feb 06, 2021 12:44 pm

I created this issue :
https://bitbucket.org/chromiumembedded/ ... e-loop-not

I just found the cause of the resize issue in the CEF4Delphi demos and it's now fixed.

I was using the PXDisplay returned by cef_get_xdisplay in the XConfigureWindow call to resize the browser. This worked in M87 but it no longer works in M88 so I used the same solution as cefclient : getting the PXDisplay value from GDK_WINDOW_XDISPLAY.

Thanks Marshall !
Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects.
User avatar
salvadordf
Expert
 
Posts: 129
Joined: Sun Dec 18, 2016 8:39 am
Location: Spain

Re: Browser Window Not Resizing in 4324 Branch on Linux

Postby magreenblatt » Tue Feb 09, 2021 6:22 pm

magreenblatt wrote:In case I wasn't clear above, you can download the "Standard Distribution" from here and use that to build the cefclient sample application.

No package 'libva' found

You can try installing the libva-dev package.

This will likely still cause build errors if your distro installs libva version >= 2 (like on Ubuntu 18), in which case you can instead set use_vaapi=false via GN_DEFINES to avoid the libva dependency all-together.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Browser Window Not Resizing in 4324 Branch on Linux

Postby Mayhew » Thu Feb 18, 2021 1:18 pm

I have an update as well. We are running single-threaded message loop but I was able to fix the resizing issue in our event handler for the GTK size-allocate event. Our handler for that event is almost identical to the CEFClient's implementation. We simply setup the XWindowChanges and call XConfigureWindow but for some reason the call wouldn't resize the main browser window. I added an XFlush(xdisplay) and that seemed to fix it. I'm not sure if this is related to the multi-threaded message loop issues or not. As I mentioned before, this worked fine on 87.
Mayhew
Expert
 
Posts: 303
Joined: Mon Apr 18, 2011 8:02 pm

Re: Browser Window Not Resizing in 4324 Branch on Linux

Postby Mayhew » Mon Mar 01, 2021 7:43 pm

Okay, update to my update here. While using Flush fixed resizing, we later found a crash when displaying a GTK open/save dialog. After seeing that the use of GDK_WINDOW_XDISPLAY vs. cef_get_xdisplay helped salvadordf, I took a look at what CEF client is doing in that regard. After reworking my GTK windows creation code to mimic the latest cefclient code, all of the problems w/88 went away and I was able to remove the Flush call.
Mayhew
Expert
 
Posts: 303
Joined: Mon Apr 18, 2011 8:02 pm

Previous

Return to Support Forum

Who is online

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