Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

desktop.fullScreen = true in combination with BrowserComponent not working on 1920 x 1080 #2712

Closed
kroepr opened this issue Feb 20, 2019 · 18 comments
Assignees
Milestone

Comments

@kroepr
Copy link

kroepr commented Feb 20, 2019

No description provided.

@kroepr kroepr closed this as completed Feb 20, 2019
@kroepr kroepr changed the title fullscreen desktop.fullScreen = true in combination with BrowserComponent not working on 1920 x 1080 Feb 20, 2019
@kroepr kroepr reopened this Feb 20, 2019
@kroepr
Copy link
Author

kroepr commented Feb 20, 2019

Refers to issue #2669 . Issue not fixed.

@kroepr
Copy link
Author

kroepr commented Feb 20, 2019

package com.cn1test;

import com.codename1.io.Log;
import static com.codename1.ui.CN.*;
import com.codename1.ui.Dialog;
import com.codename1.ui.Form;
import com.codename1.ui.Toolbar;
import com.codename1.ui.plaf.UIManager;
import com.codename1.ui.util.Resources;

/**
 * This file was generated by <a href="https://www.codenameone.com/">Codename
 * One</a> for the purpose of building native mobile applications using Java.
 */
public class MyApplication
{
    private Form current;
    private Resources theme;
    private BrowserForm browserForm;

    public void init(Object context)
    {
        // use two network threads instead of one
        updateNetworkThreadCount(2);
        requestFullScreen();

        theme = UIManager.initFirstTheme("/theme");

        // Enable Toolbar on all Forms by default
        Toolbar.setGlobalToolbar(true);

        // Pro only feature
        Log.bindCrashProtection(true);
    }

    public void start()
    {
        if (current != null)
        {
            current.show();
        }
        else
        {
            browserForm = new BrowserForm();

            current = browserForm;
            browserForm.show();

            browserForm.setPage("<html><body>HELLO WORLD</body><html>");
            test();
        }
    }

    public void stop()
    {
        current = getCurrentForm();
        if (current instanceof Dialog)
        {
            ((Dialog) current).dispose();
            current = getCurrentForm();
        }
    }

    public void destroy()
    {
    }

    public void test()
    {
        browserForm.setPage("<html><body>HELLO WORLD</body><html>");
    }
}

@kroepr
Copy link
Author

kroepr commented Feb 20, 2019

Windows Desktop Build still not fullscreen on 1920 x 1080

@codenameone codenameone added this to the Version 7.0 milestone Mar 10, 2019
@kroepr
Copy link
Author

kroepr commented Mar 14, 2019

How do send a Windows Desktop Build that will use this fix?

@kroepr
Copy link
Author

kroepr commented Mar 25, 2019

Steve, I want to make sure this fixes the issue, how do send a Windows Desktop Build that will use this fix?

Currently the Windows Desktop Build still has the same issue.

shannah added a commit that referenced this issue Mar 25, 2019
and
Javascript CapturePhotoSample, related to #2702
@shannah
Copy link
Collaborator

shannah commented Mar 25, 2019

The test case for this issue is at
https://github.com/codenameone/CodenameOne/blob/master/Samples/samples/FullScreenWithBrowserComponentSample/FullScreenWithBrowserComponentSample.java

I just send a Windows Desktop build for it on the production build server and it seems to be working fine for me on my Surface Pro/Windows 10 machine.

I have recently added a samples section to the Codename One repository along with a SampleRunner application that will allow you easily browse and build samples on your own machine, against the master CN1 sources. Instructions can be found here.

This sample is one of the samples that you can currently build and run in the SampleRunner.

Or you can just copy/paste/modify this sample the old fashioned way.

@kroepr
Copy link
Author

kroepr commented Mar 25, 2019

Steve,

I just sent a new Windows Desktop Build to the production build server and it is not fixed. I am running Windows 10 as well on a screen resolution of 1920x1080. Screen is fullscreen for 1 second when app starts and then the window resizes (See attached screenshot).

fullscreen

@shannah shannah reopened this Mar 25, 2019
@shannah
Copy link
Collaborator

shannah commented Mar 25, 2019

I only have 3 windows machines. All work fine with the "FullScreenWithBrowserComponentSample" sample.

@codenameone Do you have access to a windows machine that you can test this on?

This is a link to the windows desktop build of that test case.
https://drive.google.com/file/d/1JKsXXu8kT0wuof64H8scy8YF_5glmfY6/view?usp=sharing

@shannah
Copy link
Collaborator

shannah commented Mar 25, 2019

@kroepr Can you try this build also, just to make sure that we're working with the same thing
https://drive.google.com/file/d/1JKsXXu8kT0wuof64H8scy8YF_5glmfY6/view?usp=sharing

@kroepr
Copy link
Author

kroepr commented Mar 25, 2019

@shannah I do not seem to have access rights since it does not allow me to download the .exe

@shannah
Copy link
Collaborator

shannah commented Mar 25, 2019

@kroepr The has public permissions - anyone with the link can access it. You must have some restriction on your end that is blocking .exe downloads?

@kroepr
Copy link
Author

kroepr commented Mar 27, 2019

@shannah. Downloaded the .exe you sent and it has the same issue. See screenshot:

fullscreen2

@shannah
Copy link
Collaborator

shannah commented Mar 27, 2019

I was finally able to reproduce this issue on my Surface... I had been using Microsoft Remote Desktop, which was working fine, but when I used the surface directly, the issue was reproduced.

I have made a change that fixes this issue for me.

It will be available in the next update (on Friday).

@kroepr
Copy link
Author

kroepr commented Mar 27, 2019

@shannah. Perfect, I'll test it when it's available.

@kroepr
Copy link
Author

kroepr commented Apr 1, 2019

@shannah. I just tested the Windows Desktop Build and fullscreen still does not work.

@shannah
Copy link
Collaborator

shannah commented Apr 1, 2019

Looks like it is this JDK bug related to HiDPI settings of the app.

What I've observed:

  1. If you run the .exe file produced by the Windows Desktop Build on a HiDPI machine, it will produce incorrect results on first load for this test case. It won't fill the screen.
  2. If you include sources, and then build the resulting project in Netbeans, then it works properly.
  3. The .exe file produced by Windows Desktop Build will work correctly if you change the Hi DPI settings for the app. (e.g. Right click the .exe (not the setup - the .exe installed by Setup), and select "Properties" > "Compatability" tab > "Change Hi DPI Settings" > Check the "Override high DPI scaling behavior" box).

The workround suggested in the JDK Bug was to use a tool like mt.exe to copy a manifest file into the exe file.

I think it is likely that the work that @codenameone is doing right now with ZuluFX will fix this issue.

@shannah shannah reopened this Apr 1, 2019
@kroepr
Copy link
Author

kroepr commented Apr 1, 2019

@shannah. Thank you for the quick response. The workaround "Override high DPI scaling behavior" is working.

We will wait for the ZuluFX work to be finished for production.

@shannah
Copy link
Collaborator

shannah commented Aug 1, 2019

It looks like this is working in the zuluFX build. I.e. If you add the win.desktop-vm=zuluFx8 build hint, it resolves this issue.

@shannah shannah closed this as completed Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants