-
Bug
-
Resolution: Fixed
-
P3
-
21
-
b26
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8335484 | 17.0.13-oracle | Harshitha Onkar | P3 | Resolved | Fixed | b02 |
JDK-8336126 | 17.0.13 | Matthias Baesken | P3 | Resolved | Fixed | b01 |
JDK-8337829 | 11.0.26-oracle | Harshitha Onkar | P3 | Resolved | Fixed | b01 |
JDK-8340234 | 8u441 | Renjith Kannath Pariyangad | P3 | Resolved | Fixed | b01 |
This comes with some difficulties, and one of them is the inability to get screenshots from the system.
This is because we now use the [X Window System API](https://en.wikipedia.org/wiki/X_Window_System) to capture screenshots and it cannot access data outside the [XWayland server](https://wayland.freedesktop.org/xserver.html)
But this functionality is a very important part of automated testing.
At the moment there are two obvious solutions to this problem, and both use [xdg-desktop-portal](https://github.com/flatpak/xdg-desktop-portal):
1. [org.freedesktop.portal.Screenshot DBUS API](https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.Screenshot)
It has several drawbacks though:
+ It saves a screenshot to disk, which must be read and deleted(may add some delays depending on the type of a disk drive).
+ There is no way to disable the visual "screen flash" after screenshot
+ It asks a user confirmation to save a screenshot. This confirmation can be saved on Gnome 43+.
Since we would like Ubuntu 22.04 LTS which comes with Gnome 42 this option is not acceptable for us because it would require user confirmation for each screenshot.
But we still can consider this option as a fallback.
2. [org.freedesktop.portal.ScreenCast](https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.ScreenCast)
It typically used by applications that need to capture the contents of the user's screen or a specific window for the purpose of sharing, recording, or streaming.
This might be a bit of overkill, but it avoids several of the problems mentioned in the Screenshot API.
+ implementation is more complicated comparing to Screenshot API
+ no intermediate file, screenshot data can be obtained from memory
+ Permission to make screenshots can be stored with [`restore_token`](https://flatpak.github.io/xdg-desktop-portal/#gdbus-method-org-freedesktop-portal-ScreenCast.SelectSources)
- backported by
-
JDK-8335484 [Wayland] [XWayland] java.awt.Robot taking screenshots
- Resolved
-
JDK-8336126 [Wayland] [XWayland] java.awt.Robot taking screenshots
- Resolved
-
JDK-8337829 [Wayland] [XWayland] java.awt.Robot taking screenshots
- Resolved
-
JDK-8340234 [Wayland] [XWayland] java.awt.Robot taking screenshots
- Resolved
- csr for
-
JDK-8307456 [Wayland] [XWayland] java.awt.Robot taking screenshots
- Closed
- duplicates
-
JDK-8194136 api/java_awt/interactive/RobotTest0001 and RobotTest0002 doesn't work properly。
- Closed
-
JDK-8194941 Some tests using Robot fail on Ubuntu 17.10 with wayland server
- Closed
-
JDK-8269245 [wayland] java.awt.Robot.createScreenCapture(r) produces black image
- Closed
- is blocked by
-
JDK-8296415 [XWayland] Fix screenshot after display changes
- Resolved
-
JDK-8300994 [XWayland] screencast may hang sometimes
- Resolved
- relates to
-
JDK-8309621 [XWayland][Screencast] screen capture failure with sun.java2d.uiScale other than 1
- Resolved
-
JDK-8312591 GCC 6 build failure after JDK-8280982
- Resolved
-
JDK-8309703 AIX build fails after JDK-8280982
- Closed
-
JDK-8307779 Relax the java.awt.Robot specification
- Resolved
-
JDK-8326712 Robot tests fail on XWayland
- Resolved
- links to
-
Commit openjdk/jdk/9d7bf532
-
Commit(master) openjdk/jdk17u-dev/c915eaf4
-
Review openjdk/jdk/13803
-
Review openjdk/jdk/13804
-
Review(master) openjdk/jdk17u-dev/2700