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.

Browser Window Not Resizing in 4324 Branch on Linux

Postby Mayhew » Tue Jan 26, 2021 4:05 pm

This seems to be an injection between 4280 and 4324.

Calling CefBrowserHost::NotifyMoveOrResizeStarted within our GTK resize event handler no longer causes the CEF browser to resize. This worked in 4280. This doesn't occur in cefsimple so I assume it is due to some x11 implementation changes. Anything come to mind that could have caused this? i.e. a refactoring in some of the underlying x11 implementation.
Mayhew
Expert
 
Posts: 303
Joined: Mon Apr 18, 2011 8:02 pm

Re: Browser Window Not Resizing in 4324 Branch on Linux

Postby magreenblatt » Tue Jan 26, 2021 5:22 pm

What Linux distro and window manager? Does the problem reproduce with cefclient?
magreenblatt
Site Admin
 
Posts: 12384
Joined: Fri May 29, 2009 6:57 pm

Re: Browser Window Not Resizing in 4324 Branch on Linux

Postby Mayhew » Tue Jan 26, 2021 6:22 pm

I tested on Debian, not sure of the window management. I need to setup to build CEF locally to get a cefclient build as the spotify build packages on linux don't include cefclient.
Mayhew
Expert
 
Posts: 303
Joined: Mon Apr 18, 2011 8:02 pm

Re: Browser Window Not Resizing in 4324 Branch on Linux

Postby magreenblatt » Tue Jan 26, 2021 7:19 pm

You can build cefclient using the binary distribution.
magreenblatt
Site Admin
 
Posts: 12384
Joined: Fri May 29, 2009 6:57 pm

Re: Browser Window Not Resizing in 4324 Branch on Linux

Postby Mayhew » Thu Jan 28, 2021 1:22 pm

I'm going through the manual build setup steps and am getting the following when I run create.sh. I was able to follow the automated build steps and get cefsimple builds but when trying to build cefclient I also get this same error. Any ideas?

Code: Select all
ERROR at //build/config/linux/pkg_config.gni:103:17: Script returned non-zero exit code.
    pkgresult = exec_script(pkg_config_script, args, "value")
                ^----------
Current dir: /usr/local/google/home/jmayhew/cef/chromium_git/chromium/src/out/Debug_GN_x64/
Command: python /usr/local/google/home/jmayhew/cef/chromium_git/chromium/src/build/config/linux/pkg-config.py libva
Returned 1.
stderr:

Package libva was not found in the pkg-config search path.
Perhaps you should add the directory containing `libva.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libva' found
Could not run pkg-config.
Mayhew
Expert
 
Posts: 303
Joined: Mon Apr 18, 2011 8:02 pm

Re: Browser Window Not Resizing in 4324 Branch on Linux

Postby magreenblatt » Thu Jan 28, 2021 4:41 pm

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.
magreenblatt
Site Admin
 
Posts: 12384
Joined: Fri May 29, 2009 6:57 pm

Re: Browser Window Not Resizing in 4324 Branch on Linux

Postby Mayhew » Thu Jan 28, 2021 8:17 pm

Oh, I didn't realize the destribution packages contained everything to build from CMake. That is very helpful. I thought you meant to stuff those files into an existing cef source tree and run ninja on it or something. My misunderstanding.

Installing the dev package also worked.

Regarding the resizing issue I do not see the problem in CefClient either so it must be something on our side.
Mayhew
Expert
 
Posts: 303
Joined: Mon Apr 18, 2011 8:02 pm

Re: Browser Window Not Resizing in 4324 Branch on Linux

Postby Mayhew » Fri Jan 29, 2021 3:11 pm

I'm at a bit of a loss but think this could be due to the "fragility" mentioned in the views info (https://bitbucket.org/chromiumembedded/cef/issues/1749). We aren't using views and are parenting the main browser window with a GTK 2.0 window.
Mayhew
Expert
 
Posts: 303
Joined: Mon Apr 18, 2011 8:02 pm

Re: Browser Window Not Resizing in 4324 Branch on Linux

Postby salvadordf » Sat Feb 06, 2021 5:43 am

I also tried to build cefclient in Linux because we're also having resizing issues in the CEF4Delphi demos for Linux.

I'm still learning a lot about Linux and I may have missed some step but I tried to do this on Linux Mint 20.1 Cinnamon (64 bits) :
  • I downloaded the "Standard Distribution" : https://cef-builds.spotifycdn.com/cef_b ... 64.tar.bz2
  • I decompressed it and checked that the following packages were installed : build-essential, libgtk2.0-dev and libgtkglext1-dev
  • I created the "build" directory with the command : mkdir build && cd build
  • Then I built the apps using the Unix makefile commands :
    • cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ..
    • make -j4 cefclient cefsimple
  • The build process reached 100% in a few seconds and then I executed the following commands as instructed on the screen :
    • EXE="/home/<username>/cef_binary_88.2.4+gf3c4ca9+chromium-88.0.4324.150_linux64/build/tests/cefclient/Debug/chrome-sandbox" && sudo -- chown root:root $EXE && sudo -- chmod 4755 $EXE
    • EXE="/home/<username>/cef_binary_88.2.4+gf3c4ca9+chromium-88.0.4324.150_linux64/build/tests/cefsimple/Debug/chrome-sandbox" && sudo -- chown root:root $EXE && sudo -- chmod 4755 $EXE
  • Then I switched to the directory where cefclient was created, executed "./cefclient" and it run perfectly. No resizing issues and everything was perfect.
  • Then I tried to run cefclient with the multithreaded message loop switch with this command "./cefclient --multi-threaded-message-loop" (without quotes). The use interface didn't show buttons or the address bar. The window didn't resize the first time I tried. When I tried to resize the window again then it changed the window size but the browser didn't resize.
  • I tried to run "./cefclient --multi-threaded-message-loop" again and navigated to youtube using the links from the google.com page but cefclient froze with this message in the log : "[0206/110339.358305:ERROR:browser_platform_delegate.cc(229)] Not implemented reached in virtual std::unique_ptr<CefJavaScriptDialogRunner>"


Please, let me know if I missed some step.

The attached image is what I see when I run cefclient with the multithreaded message loop switch.

Edit : I forgot to add that I have to kill cefclient because it doesn't respond to the close button in the window.
The resize problems appeared in CEF 88 in our demos but if we use CEF 87 then it works correctly.
Edit 2 : Fixed the CEF binaries link to the one I used.
Attachments
cefclient.png
cefclient.png (78.07 KiB) Viewed 5429 times
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 » Sat Feb 06, 2021 11:23 am

Please add a bug for multi-threaded-message-loop not working in M88.
magreenblatt
Site Admin
 
Posts: 12384
Joined: Fri May 29, 2009 6:57 pm

Next

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 18 guests