I am trying to understand the difference between the different screen details in my example below. If I run this to get the pixel size of the screen,
UI.getCurrent().getPage().retrieveExtendedClientDetails((extendedClientDetails) -> {
Integer windowHeight = extendedClientDetails.getWindowInnerHeight();
Integer windowWidth = extendedClientDetails.getWindowInnerWidth();
System.out.println("Window=" + windowWidth + "x" + windowHeight);
Integer screenHeight = extendedClientDetails.getBodyClientHeight();
Integer screenWidth = extendedClientDetails.getBodyClientWidth();
System.out.println("Screen=" + screenWidth + "x" + screenHeight);
Integer monitorHeight = extendedClientDetails.getScreenHeight();
Integer monitorWidth = extendedClientDetails.getScreenWidth();
System.out.println("Monitor=" + monitorWidth + "x" + monitorHeight);
I am getting this as a sample output
Window=1860x1179
Screen=1860x1179
Monitor=2400x1500
Monitor is seems to be somewhat related to the monitor resolution (I have a two screens running at 1920x1200) but the Window and screen output is always the same. I expected these values to change if I resize the browser window but they don’t seem to unless I close a session and reopen it. I’m using Firefox V70.0.1 to test this.
I am trying to get the actual display size of the browser. Why does the output not change with browser window resizing?
Thanks,
Andrew