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

sun.awt.X11.XToolkit.getScreenInsetsManually() incorrect handle _NET_WM_STRUT

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 7
    • Fix Version/s: 8-pool
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      linux

      Description

      FULL PRODUCT VERSION :
      java version "1.7.0_03"
      OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7~u3-2.1.1~pre1-1ubuntu2)
      OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)


      ADDITIONAL OS VERSION INFORMATION :
      Linux it319k6 3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

      A DESCRIPTION OF THE PROBLEM :
        From

      http://standards.freedesktop.org/wm-spec/1.3/ar01s05.html

      "
      _NET_WM_STRUT_PARTIAL

      ...

      Struts MUST be specified in root window coordinates, that is, they are not
      relative to the edges of any view port or Xinerama monitor.

      ...

      Assume that the set up uses two monitors, one running at 1280x1024 and the
      other to the right running at 1024x768, with the top edge of the two physical
      displays aligned. If the panel wants to fill the entire bottom edge of the
      smaller display with a panel 50 pixels tall, it should set a bottom strut of
      306, with bottom_start_x of 1280, and bottom_end_x of 2303.

      ...
      "

      Thus the getScreenInsetsManually() must take into account screenBounds and
      rootBounds (see workaround)


      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      http://hg.openjdk.java.net/build-infra/jdk8/jdk/file/a3851a6bd1a9/src/solaris/classes/sun/awt/X11/XToolkit.java
      @@ -857,10 +857,10 @@
                           // managers don't set this hint correctly, so we just get intersection with windowBounds
                           if (windowBounds != null && windowBounds.intersects(screenBounds))
                           {
      - insets.left = Math.max((int)Native.getLong(native_ptr, 0), insets.left);
      - insets.right = Math.max((int)Native.getLong(native_ptr, 1), insets.right);
      - insets.top = Math.max((int)Native.getLong(native_ptr, 2), insets.top);
      - insets.bottom = Math.max((int)Native.getLong(native_ptr, 3), insets.bottom);
      + insets.left = Math.max((int)Native.getLong(native_ptr, 0) - screenBounds.x, insets.left);
      + insets.right = Math.max((int)Native.getLong(native_ptr, 1) - (rootBounds.width - (screenBounds.x + screenBounds.width)), insets.right);
      + insets.top = Math.max((int)Native.getLong(native_ptr, 2) - screenBounds.y, insets.top);
      + insets.bottom = Math.max((int)Native.getLong(native_ptr, 3) - (rootBounds.height - (screenBounds.y + screenBounds.height)), insets.bottom);
                           }
                       }
                   }

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: