JDK-7057287 : KDE 4 task bar is always on top of fullscreen Java applications
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6u26,9
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2011-06-21
  • Updated: 2015-07-07
  • Resolved: 2015-07-07
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 9
9Resolved
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Mageia Linux 1 kernel 2.6.38

EXTRA RELEVANT SYSTEM CONFIGURATION :
KDE SC 4.6.3

A DESCRIPTION OF THE PROBLEM :
KDE task bar is always drawn on top of Java applications even when they are in fullscreen mode.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Launch a Java Web Start application using fullscreen mode in command line by
typing for example javaws http://tuer.sourceforge.net/tuer.jnlp
2. Click on the button "Ok" once (with Oracle Java) or 3 times on the button
"Run" (with icedtea-web and OpenJDK)

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The application occupies the whole screen, the task bar is not visible.
ACTUAL -
The application occupies the whole screen except the bottom, the task bar is visible.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JFrame;

public class FullscreenTest {

	public static void main(String[] args) {
		JFrame frame = new JFrame();
		Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
        frame.setSize(dim);
        frame.setUndecorated(true);
        frame.setVisible(true);
	}
}
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
See here (legacy fullscreen support):
https://bugs.kde.org/show_bug.cgi?id=276159

SUPPORT :
YES
Copying comments from http://bugs.openjdk.java.net/show_bug.cgi?id=100191
Description From Julien Gouesse 2011-06-28 07:42:58 PDT

FULL PRODUCT VERSION :
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Mageia Linux 1 kernel 2.6.38

EXTRA RELEVANT SYSTEM CONFIGURATION :
KDE SC 4.6.3

A DESCRIPTION OF THE PROBLEM :
KDE task bar is always drawn on top of Java applications even when they are in
fullscreen mode. The problem happens both with the simulated fullscreen mode
(maximized undecorated window) and with the real fullscreen exclusive mode
(using GraphicsDevice.setFullScreenWindow(Window w)).

After a deep analysis, X11 properties are not modified whatever the window
manager (I tested with GNOME, KDE 3.5.4 and KDE SC 4.6.3). I used xprops as you
can see in this report:
https://bugs.kde.org/show_bug.cgi?id=276159

This bug does not concern GNOME because it does not demand a window to be on
top of its stack to be promoted as fullscreen. Actually, using the simulated
fullscreen mode even without using XLib to set the atoms properly is not
required with GNOME. Someone on Javagaming.org said that KDE should not only
promote windows on top of its stack as it is not conformant with the EWMH
specification but it has to be verified. Anyway, the EWMH specification tells
at least that the _NET_WM_STATE_FULLSCREEN should be set in this case.
XChangeProperty should have been called to set this property, this call is
missing. Please look at the patch below, in the last section.


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Launch a Java Web Start application using fullscreen mode in command line by
typing for example javaws http://tuer.sourceforge.net/alpha/tuer.jnlp or
http://tuer.sourceforge.net/very_experimental/tuer.jnlp
2. Click on the button "Ok" once (with Oracle Java) or 3 times on the button
"Run" (with icedtea-web and OpenJDK)

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The application occupies the whole screen, the task bar is not visible.
ACTUAL -
The application occupies the whole screen except the bottom, the task bar is
visible.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JFrame;

public class FullscreenTest {

    public static void main(String[] args) {
        JFrame frame = new JFrame();
        Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
        frame.setSize(dim);
        frame.setUndecorated(true);
        frame.setVisible(true);
    }
}

PATCH

OpenJDK 1.6 build 22, 2011/02/28
/jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c

@@ -1758,6 +1758,15 @@
     Atom wmState = XInternAtom(awt_display, "_NET_WM_STATE", False);
     Atom wmStateFs = XInternAtom(awt_display,
                                  "_NET_WM_STATE_FULLSCREEN", False);
+    Atom wmStateAbove = XInternAtom(awt_display,
+                                      "_NET_WM_STATE_ABOVE", False);
+
+    Atom types[2] = {0};
+    int ntypes = 0;
+    types[ntypes++] = wmStateFs;
+    types[ntypes++] = wmStateAbove;
+
+
     Window root, parent, *children = NULL;
     unsigned int numchildren;
     XEvent event;
@@ -1800,7 +1809,11 @@
     event.xclient.format = 32;
     event.xclient.data.l[0] = enabled ? 1 : 0; // 1==add, 0==remove
     event.xclient.data.l[1] = wmStateFs;
+    event.xclient.data.l[2] = wmStateAbove;
+

+    XChangeProperty( awt_display, win, wmState, XA_ATOM, 32,
+               PropModeReplace, (unsigned char *)&types, ntypes);
     XSendEvent(awt_display, root, False,
                SubstructureRedirectMask | SubstructureNotifyMask,
                &event);

Comment #1 From Tim Bell 2012-07-09 23:30:59 PDT

Closing.  SUNBUG is 7057287

Comments
Alexander, please re-evaluate this issue to fix in 9.
10-04-2015

- this is an issue reported against 7(7u), - there are now affected version 9 filed for this issue - 7u issues are transferred to Sustaining Nevertheless if someone have a report against 9 - please reopen and add affectedVersion 9 or 7u specific escalations might be reopen to Sustaining
10-08-2014

- this is an issue reported against 7(7u), - there are now affected version 9 filed for this issue - 7u issues are transferred to Sustaining Nevertheless if someone have a report against 9 - please reopen and add affectedVersion 9 or 7u specific escalations might be reopen to Sustaining
10-08-2014

EVALUATION The _NET_WM_STATE_FULLSCREEN state must be set to windows going to the full screen mode.
22-06-2011