Opened 5 years ago
Last modified 5 years ago
#190 testing defect
`Image fromView:` and `Image fromScreen` fails in XWayland sessions
Reported by: | Jan Vrany | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | default | Keywords: | |
Cc: | Also affects CVS HEAD (eXept version): | no |
Description
When running Smalltalk/X under Wayland (via XWayland since there's no native Wayland support yet). reading the contents of a screen or of a (smalltalk) window fails. To reproduce:
Image fromScreen
Image fromView: Transcript topView grab: false
The problem is that XGetImage() fails with BadMatch
. It seems that XGetImage()
is simply not supported by XWayland [1].
To capture whole screen (i.e., to support #fromScreen:
) under GNOME we may use D-BUS interface to generate a screen capture to a .png
and read it back [2], [3], [4]. Under KDE or other Wayland compositors, who knows...
[1]: https://github.com/LibVNC/x11vnc/issues/5
[2]: https://github.com/LibVNC/x11vnc/commit/528baf729f300de12c963e09d509d29d4f44ec1f
[3]: https://mail.gnome.org/archives/commits-list/2013-January/msg00410.html
[4]: http://www.matthew.ath.cx/misc/dbus
Change History (3)
comment:1 Changed 5 years ago by
comment:2 Changed 5 years ago by
Status: | new → testing |
---|
comment:3 Changed 5 years ago by
Milestone: | 8.0.0 |
---|
Since XGetImage()
is not supported at all by XWayland by design,
capture the screen we have to use compositor-specific way. Sigh.
Commit 8599cc6c703d/stx.libview added support for GNOME Shell
using external dbus-send
command.
This is a temporary solution to keep going, we should have
proper DBus support and use that. We also need to test other
environments and properly reify desktop environment.
Since this is a workaround, I keep the ticket open but no longer
schedule it to 8.0.0 since it no longer "crashes".
More resources on the problem:
[1]: https://fedoraproject.org/wiki/How_to_debug_Wayland_problems#Screen_capture_is_not_available_with_usual_apps
[2]: https://www.reddit.com/r/linux/comments/3y786p/eli5_why_wont_screen_recording_and_screenshot/
[3]: https://github.com/kwhat/libscreenshot/tree/master/src