eclipse-windowbuilder / windowbuilder

Eclipse Windowbuilder
https://projects.eclipse.org/projects/tools.windowbuilder
Eclipse Public License 1.0
79 stars 30 forks source link

Wayland support for SWT editor #633

Open ptziegler opened 10 months ago

ptziegler commented 10 months ago

When trying to capture the shell and all its widgets with Wayland, the resulting images all end up completely empty.

image

This seems to be a common problem not only we, but also the SWT team seems to be affected by.

The most concise explanation I could find boils down to:

By design, Wayland is a lot more secure than X11 and does not allow one application to capture the content of other applications

Or in short: Screen capture is not a valid use case.

Gnome seems to support using dbus API and some internal endpoints but that just reeks of bad code. Moreover, it would also mean that we have to implement this workaround for every window manager, which I don't see as a feasible solution...

Has anyone ever worked with Wayland or had to handle with this kind of problem? Suggestions would help out a lot!

My current plan is to invoke the capture mechanism from within the mocked shell (as in, the application tries to capture itself), but I have no clue if even that is allowed by Wayland...

merks commented 10 months ago

Wayland is so annoying. I can't even tell a shell where it should be located:

https://github.com/eclipse-platform/eclipse.platform.swt/issues/790