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

Toolkit.getScreenInsets() doesn't work on Linux/GNOME

    XMLWordPrintable

Details

    • b04
    • x86
    • linux
    • Not verified

    Description

      The following test prints the insets for all screens on the system. On RedHat 7.2 running GNOME/sawfish, getScreenInsets() does not recognize the GNOME taskbar - the insets are always 0,0,0,0. I tried 1.4, 1.4.1b19 and 1.4.2b01.

      // Print insets for all screens
      import java.awt.*;

      public class ScreenInsets {
          public static void main(String[] args) {
              GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
              GraphicsDevice[] gds = ge.getScreenDevices();
              for (int i = 0; i < gds.length; i++) {
                  GraphicsConfiguration gc = gds[i].getDefaultConfiguration();
                  System.out.println(gc + ", insets: " + Toolkit.getDefaultToolkit().getScreenInsets(gc));
              }
          }
      }

      Attachments

        Issue Links

          Activity

            People

              art Artem Ananiev (Inactive)
              bchristi Brent Christian
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: