Page 1 of 2

Win10 system screen zoom layout setting 150%, the operation

PostPosted: Thu Apr 11, 2019 12:48 am
by wnaglei
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

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

PostPosted: Thu Jun 06, 2019 2:36 pm
by dtanzer
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.

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

PostPosted: Tue Jul 02, 2019 11:48 pm
by dtanzer
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?

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

PostPosted: Wed Jul 03, 2019 12:09 am
by amaitland
You can forcibly disable scaling using --force-device-scale-factor=1

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

PostPosted: Wed Jul 03, 2019 7:57 am
by magreenblatt

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

PostPosted: Wed Jul 03, 2019 11:40 pm
by dtanzer
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?

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

PostPosted: Thu Jul 04, 2019 2:33 am
by Czarek
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.

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

PostPosted: Mon Jul 08, 2019 12:20 am
by dtanzer
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?

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

PostPosted: Mon Jul 08, 2019 3:27 am
by Czarek
Have you tried other values like 1.5, 2, 2.5 with --force-device-scale-factor?

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

PostPosted: Mon Jul 08, 2019 9:57 am
by dtanzer
--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?