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

createScreenCapture not working as expected on multimonitor setup with different DPI scales.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b161
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description



        Test case Attached.

        On Windows8.1:
        Primary monitor(screen0) 192DPI
        Secondary monitor(screen1) 144DPI
        When the frame is on screen0: works as expected, created screenshots contain the frame.
        when the frame is on screen1: created screenshots do not contain the frame.
         It could be because the screenshot method uses scale 2 as on the first screen instead 1.5 that is actual scale on the second screen. So the region where the screenshot is taken is shifted.

        On Linux: Not Tested.

        On MacOS Sierra version 10.12:
        Tested dual monitor setup with primary Retina display and connecting a secondary monitor non-Retina display. keeping secondary monitor to the right/left of main display and targeted rectangle on each sides, expected results are obtained.


          Attachments

          1. RobotMRIScreenShotTest.java
            4 kB
            Prem Balakrishnan
          2. screen-0-resolution-variant-0.png
            6 kB
            Prem Balakrishnan
          3. screen-0-resolution-variant-1.png
            13 kB
            Prem Balakrishnan
          4. screen-1-resolution-variant-0.png
            35 kB
            Prem Balakrishnan
          5. screen-1-resolution-variant-1.png
            117 kB
            Prem Balakrishnan

            Issue Links

              Activity

                People

                • Assignee:
                  alexsch Alexandr Scherbatiy
                  Reporter:
                  pkbalakr Prem Balakrishnan (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: