Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8051617

Fullscreen mode is not working properly on Xorg

    XMLWordPrintable

Details

    • b65
    • generic
    • linux

    Backports

      Description

        GraphicsDevice.setFullScreenWindow doesn't set JFrame to real fullscreen. It's always created with decorations below (or above) panels.
        On windows frame could be set to fullscreen without any hacks.
        Window manager doesn't matter.

        Reproducible: Always
        Is a regression: No
        Workaround exists: Yes

        Following code makes JFrame really fullscreen.
        f.setUndecorated(true);
                f.setResizable(false);
                f.addFocusListener(new FocusListener() {

                    @Override
                    public void focusGained(FocusEvent arg0) {
                        f.setAlwaysOnTop(true);
                    }

                    @Override
                    public void focusLost(FocusEvent arg0) {
                        f.setAlwaysOnTop(false);
                    }
                });

        I didn't find workaround for pure awt windows, they are still created under the panels.
        Also, ugly demo attached. On windows it always works normally.

        P.S. I've noticed a similar bug, but it was closed as won't fix (metacity bug). But I've reproduced the same on KDE/kwin and other WM's.
        I'm not sure whether it's a jdk or WM bug.

        Attachments

          Issue Links

            Activity

              People

                azvegint Alexander Zvegintsev
                arusakov Andrey Rusakov (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: