Skip to content

Preliminary Wayland support

Andre Miranda requested to merge andreldm/xfce4-screenshooter:wayland into master

Summary

  • It doesn't crash anymore
  • Requires a wlroots-based compositor (as other Xfce components)
  • Fullscreen capture works using wlr-screencopy (tested with Wayfire and Labwc)
  • Rectangle region will be implemented in another MR
    • Probably we'll need to use wlr-layer-shell to create an overlay layer
    • gtk-layer-shell looks interesting
  • Active Window region is disabled, the screencopy protocol doesn't support single windows at the moment (issue)
    • I'm not sure if there is a way to accomplish that under Wayland, the last resort will be a custom protocol for our compositor

TODO

  • Better error handling, show messages to user
  • Support multi-monitor
  • Add support to region selection mode → out of scope for this MR
  • Disable features not supported by the wlr screencopy protocol, i.e. active window and whether to capture border
  • How to test image conversion beyond the ABGR8888 format (the one used by wlroots) → Hopefully the code works, if not we'll receive bug reports
  • Clean up wayland objects (call destroy for buffer, screencopy_manager, shm, etc)
  • Test panel plugin
  • Check for memory leaks
Edited by Andre Miranda

Merge request reports