-
Notifications
You must be signed in to change notification settings - Fork 166
Screenshots on Wayland are always white [Snippet215] #673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
|
The issue seems to be connected to wayland. When is login with "Ubuntu on xorg" the issue no longer occurs.
I named the SWT libs wrongly and and when wrote the ticket i copied the mistake. Correct is: I tested this with SWT 4.26 and 4.27. Sorry for the confusion. While the switch from Wayland to X works, this issue is not solved by this. Kind regards |
WorkaroundOn SWT 3.129, GTK 3.24.41, using X11, screenshots taken with this method are always the same as the first taken screenshot. In other words, the state of screen is captured once and can never be updated. I assume, that you are capturing right before actual rendering happens, and then try again later. Try to only capture the last shot. |
This issue has already been fixed: With current I-Builds, screenshots will capture the current state again (when using X11). |
Describe the bug
When creating a screenshot as described by Snippet215, the resulting image is all white. I would expect that the image instead contains a content reflecting the pixels displayed when the screenshot was taken.
To Reproduce
Easiest would be to execute Snippet215 on Ubuntu 22.
But essentially the following code seems not to work
Expected behavior
I would expect to be able to create an screenshot with SWT. Preferably as demonstrated in Snippet215
Screenshots

Environment:
Additional OS info (e.g. OS version, Linux Desktop, etc)
I tested this on Windows 10, Ubuntu 20 and Ubuntu 22. Only Ubuntu 22 has this issue.
JRE/JDK version
Tested with JDK 17
Version since
Tested with 4.26 and 4.27. Both had the same issue
Workaround (or) Additional context
I was not able to find a workaround.
I found this issue while investigating why our SWTBot test does not produce any screenshots. SWTBot uses SWT to create screenshot in a similar way as Snippet215
Kind regards
Dieter Mai
The text was updated successfully, but these errors were encountered: