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

[TEST_BUG] TrayIcon tests: could SystemTrayIconHelper's getTrayIconLocation() be reworked in more reliable way for Windows?

XMLWordPrintable

    • os_x, windows

      The following tests TrayIcon tests behave unstable on Windows because of unreliable work of SystemTrayIconHelper's getTrayIconLocation() method:
      ActionCommand/ActionCommand.java
      ModalityTest/ModalityTest.java
      MouseEventMask/MouseEventMaskTest.java
      SecurityCheck/FunctionalityCheck/FunctionalityCheck.java
      TrayIconEventModifiers/TrayIconEventModifiersTest.java
      TrayIconEvents/TrayIconEventsTest.java
      TrayIconMouseTest/TrayIconMouseTest.java
      TrayIconPopup/TrayIconPopupTest.java

      The method returns erroneous icon location (as it associates the icon with arbitrary black region of the screen) if:
      - there is a cygwin or cmd terminal opened (maximized or in the lower right corner of the screen)
      - desktop background is black in the same corner
      - the test icon (black) is even mixed up with cmd icon in tray (if the latter went to tray icon pool) causing disordered opening of new cmd windows (Win. 8)

      Moreover, this method couldn't be extrapolated nicely if, e.g., multi-resolution image is used for tray icon instead of BufferedImage or UI scale is set (sun.java2d.uiScale).

      tested with: Win. 7, 8; JDK9 b106

            kizune Alexander Zuev
            avstepan Alexander Stepanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: