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

Window.setLocationRelativeTo() does not work properly for multi-monitor virtual screen configs

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b27
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      Window.setLocationRelativeTo() does not work properly for virtual screen setups. This method calculates incorrect locations for a vertical virtual screen setup where the Y value of one of the screen bounds is non-zero. When comparing whether the newly calcuated Y location + window.height exceeds the max screen height, it does not take into account the Y value of the screen. On a vertical virtual screen setup, this Y value will be non-zero and location of any window is with respect to the entire virtual space. It must add the 'Y' value of the screen to the height of the screen as given in the suggested fix column.

      This is noticed on Win32 as well as unix + xinerama with a virtual screen having 2 screens placed vertically. Reproducible since 1.4. (More detailed config details are given under comments)

      I have attached a sample test. Execute the sample test on a vertical virtual screen setup. Move the frame to the bottom of the bottommost screen and click the button. You will see a window appearing on the primary monitor.
      ###@###.### 2004-12-22 13:36:27 GMT

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              art Artem Ananiev (Inactive)
              Reporter:
              pmohansunw Praveen Mohan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: