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

[XWayland][Screencast] screen capture failure with sun.java2d.uiScale other than 1

    XMLWordPrintable

Details

    • b20
    • linux

    Description

      java -Dsun.java2d.uiScale=2 HiDPIRobotScreenCaptureTest.java
      java -Dsun.java2d.uiScale=3 ScreenCaptureGtkTest.java

      Creating screen capture of java.awt.Rectangle[x=89,y=99,width=100,height=100]
      Exception in thread "main" java.lang.SecurityException: Screen Capture in the selected area was not allowed
      at java.desktop/sun.awt.screencast.ScreencastHelper.getRGBPixels(ScreencastHelper.java:161)
      at java.desktop/sun.awt.X11.XRobotPeer.getRGBPixels(XRobotPeer.java:139)
      at java.desktop/java.awt.Robot.createCompatibleImage(Robot.java:606)
      at java.desktop/java.awt.Robot.createScreenCapture(Robot.java:477)
      at ScreenCaptureGtkTest.captureImageOf(ScreenCaptureGtkTest.java:130)
      at ScreenCaptureGtkTest.main(ScreenCaptureGtkTest.java:96)

      https://github.com/openjdk/jdk/pull/13803#issuecomment-1564568586

      Attachments

        Issue Links

          Activity

            People

              azvegint Alexander Zvegintsev
              azvegint Alexander Zvegintsev
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: