Changes in window.screenX/Y values

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

Changes in window.screenX/Y values

Postby Phylanx » Thu Apr 09, 2026 1:52 am

Hi!

We recently upgraded from 6723 to 7499 and encountered problems due to changes in the values of window.screenX and screenY.
Setup:

Our automated integration test environment implemented clicks on screen positions calculated by the found html elements relative to the browsers screen position.
Browser is shown in a Java application, JCEF Component is centered and on the left side there is a Jawa Swing Navigation Bar, so there is some x/y offset for the browser component.

Until 6723 we got following values (expected because of java components left/above browser):
screenX: 133
screenY: 203

Since upgrade to 7499 we got following values:
screenX: -8
screenY: -8

Does anybody know what changed and how we can adapt to these changes?

Thanks, Johann
Phylanx
Expert
 
Posts: 270
Joined: Thu Aug 11, 2016 8:17 am

Re: Changes in window.screenX/Y values

Postby magreenblatt » Thu Apr 09, 2026 9:42 am

Are you using windowed or off-screen rendering?
magreenblatt
Site Admin
 
Posts: 13215
Joined: Fri May 29, 2009 6:57 pm

Re: Changes in window.screenX/Y values

Postby Phylanx » Thu Apr 09, 2026 9:54 am

windowed rendering.
what happened in the meanwhile:

The problem definitely starts with the new version but one of our java components around the browser component in our integration causes the problem.
We are still working to find out which one it is.

I'll report back if we find out the exact problem.

Thx so far!
Phylanx
Expert
 
Posts: 270
Joined: Thu Aug 11, 2016 8:17 am

Re: Changes in window.screenX/Y values

Postby Phylanx » Mon Apr 13, 2026 1:03 am

Hi again!

First of all: I got to fix some some misinformation.
screenX and screenY might not be the problem at all (was told otherwise before).
The automated integration test environment is third party and is a black box to us.
A colleague tried to find out the problem and screenX/Y was the first change on sight.

Second: the problem itself
We could reproduce the problem of the third party on not finding the exact screen locations with the detailed MainFrame.
The core problem seems to be the BrowserFrame's Layout.
As soon as you add Components to BorderLayout.SOUTH or WEST (don't know of EAST), the problem occures.
If you don't do so, the problem is not there.
Also BorderLayout.NORTH is no problem.

We are in contact with the third party to get a fix, so I guess no bug needed in jcef/cef/chromium.

But still: It's a strange behavior, does anybody know of any specialitites regarding this?
Phylanx
Expert
 
Posts: 270
Joined: Thu Aug 11, 2016 8:17 am


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 5 guests