Implement XDP window IDs on Wayland
Created by: gasinvein
This completes #431
To attach a modal window to another app on Wayland, XDP requires the app to provide a reference to its window surface. This can be done via Wayland xdg-foreign protocol.
KWayland provides a nice C++/Qt wrappers around Wayland APIs. In the future we could switch to libportal-qt5, but it doesn't support the exact feature we're after. KWayalnd in Ubuntu 18.04 is too old, thus disable its use there.
Roughly tested on GNOME (doesn't seem to support zxdg_exporter_v2
, so doesn't benefit from this PR) and Sway (supports zxdg_exporter_v2
). I didn't manage to run a nested KWin Wayland compositor, but I hope it should work there, too.