JDK-8051617 : Fullscreen mode is not working properly on Xorg
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u45,7u25,8,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: generic
  • Submitted: 2014-07-22
  • Updated: 2015-09-29
  • Resolved: 2015-04-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u60Fixed 9 b65Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
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. 
Comments
Two tests are failing. Still it is possible to make them pass using workaround. RULE 2D_FullScreen/AwtComponentTest ExitCode 1 RULE 2D_FullScreen/SwingComponentTest ExitCode 1
12-08-2014

2D_MultiMonitor/Automated#FrameFullScreenTest Test fails because of following problem
22-07-2014