Win10 system screen zoom layout setting 150%, the operation

Having problems with building or using the JCEF Java binding? Ask your questions here.

Win10 system screen zoom layout setting 150%, the operation

Postby wnaglei » Thu Apr 11, 2019 12:48 am

Using:
JCEF Version = 3.3626.211
CEF Version = 3.3626.1883
Chromium Version = 72.0.3626.81
AppHandler.stateHasChanged: INITIALIZING
initialize on Thread[AWT-EventQueue-0,6,main] with library path ./win64/bin/lib/win64
Added scheme search://
Added scheme client://
AppHandler.stateHasChanged: INITIALIZED
BrowserFrame.onAfterCreated id=1
Attachments
20190411-115133.png
20190411-115133.png (67.38 KiB) Viewed 25348 times
wnaglei
Newbie
 
Posts: 1
Joined: Wed Apr 10, 2019 10:46 pm

Re: Win10 system screen zoom layout setting 150%, the operat

Postby dtanzer » Thu Jun 06, 2019 2:36 pm

I am having the same problem: When I use my default windows zoom setting of 150%, the Chromium component is too small within the Java application.

When I set the zoom to 100% (in the windows display settings), everything works perfectly.
dtanzer
Newbie
 
Posts: 9
Joined: Thu Jun 06, 2019 2:33 pm

Re: Win10 system screen zoom layout setting 150%, the operat

Postby dtanzer » Tue Jul 02, 2019 11:48 pm

I still have the problem that on windows, when the system zoom setting is 150%, the browser component only fills a part of the available space. I thought I could fix it with adding "--no-gpu" or "--disable-gpu":

cefApp = CefApp.getInstance(new String[] {"--disable-gpu"}, settings);

This seemed to work, but only for some time, now I'm back at the same problem. Does anyone have an idea what could be wrong?
dtanzer
Newbie
 
Posts: 9
Joined: Thu Jun 06, 2019 2:33 pm

Re: Win10 system screen zoom layout setting 150%, the operat

Postby amaitland » Wed Jul 03, 2019 12:09 am

You can forcibly disable scaling using --force-device-scale-factor=1
Maintainer of the CefSharp project.
amaitland
Master
 
Posts: 708
Joined: Wed Jan 14, 2015 2:35 am

Re: Win10 system screen zoom layout setting 150%, the operat

Postby magreenblatt » Wed Jul 03, 2019 7:57 am

magreenblatt
Site Admin
 
Posts: 9831
Joined: Fri May 29, 2009 6:57 pm

Re: Win10 system screen zoom layout setting 150%, the operat

Postby dtanzer » Wed Jul 03, 2019 11:40 pm

Strange, neither --force-device-scale-factor nor --disable-gpu work anymore. I think they do not work anymore since I rebuilt the java-cef sources. Does anyone know how I can exclude the GPU libraries?
dtanzer
Newbie
 
Posts: 9
Joined: Thu Jun 06, 2019 2:33 pm

Re: Win10 system screen zoom layout setting 150%, the operat

Postby Czarek » Thu Jul 04, 2019 2:33 am

How are you setting the switches? The --force-device-sale-factor switch still exists in Chromium sources:
https://cs.chromium.org/chromium/src/ui ... m&g=0&l=32
I assume you use windowed rendering.
I suggest you pass both --disable-gpu and --disable-gpu-compositing, as in cefclient sample application. I think the GPU process is always created and that's fine. You can open "chrome://gpu" url in your browser for details.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. I'm available for contract work, see my resume.
User avatar
Czarek
Virtuoso
 
Posts: 1829
Joined: Sun Nov 06, 2011 2:12 am

Re: Win10 system screen zoom layout setting 150%, the operat

Postby dtanzer » Mon Jul 08, 2019 12:20 am

GPU seems to NOT be the problem:

run.bat win64 Release detailed --disable-gpu --disable-gpu-compositing

same effect - JComponent is too small given the available space.

--force-device-scale-factor=1 makes the problem worse: Then the JComponent becomes even smaller.

When I use my external monitor instead (where I have scale set to 100% in Windows), everything works. Anyone else experiencing this problem in Windows 10?
dtanzer
Newbie
 
Posts: 9
Joined: Thu Jun 06, 2019 2:33 pm

Re: Win10 system screen zoom layout setting 150%, the operat

Postby Czarek » Mon Jul 08, 2019 3:27 am

Have you tried other values like 1.5, 2, 2.5 with --force-device-scale-factor?
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. I'm available for contract work, see my resume.
User avatar
Czarek
Virtuoso
 
Posts: 1829
Joined: Sun Nov 06, 2011 2:12 am

Re: Win10 system screen zoom layout setting 150%, the operat

Postby dtanzer » Mon Jul 08, 2019 9:57 am

--force-device-scale-factor=1
--force-device-scale-factor=2
--force-device-scale-factor=4

all have the same effect. The component uses half the available space (both vertically and horizontally), rendering exactly the same.

It seems to me that the native code somehow calculates the available space within the JComponent incorrectly. Any idea where I could start to debug that?
dtanzer
Newbie
 
Posts: 9
Joined: Thu Jun 06, 2019 2:33 pm

Next

Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 2 guests

cron