Faculty of Information Technology
Software Engineering Group

Opened 16 months ago

Last modified 14 months 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


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:2 Changed 15 months ago by Jan Vrany

Status: newtesting

comment:3 Changed 14 months ago by Jan Vrany

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".

Note: See TracTickets for help on using tickets.