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

KDE 4 task bar is always on top of fullscreen Java applications

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • 9
    • 6u26, 9
    • client-libs
    • x86
    • linux

      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

            azvegint Alexander Zvegintsev
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: