Skip to content

add color picking support on wayland using the XDG desktop portal

On wayland applications are not trusted to perform screen grabs by default, it is however possible to let the user specifically pick the color of a pixel using the XDG desktop portal (otherwise used for sandboxing etc.). Try to use this portal on unix systems by default.

To support this use case some extra abstraction is necessary as this constitutes a platformservice rather than a platform feature. To that end the QPlatformService has gained a capability system and a pure virtual helper class to facilitate asynchronous color picking. When supported the color picking capability takes precedence over the custom picking code in QColorDialog.

Fixes: QTBUG-81538 Change-Id: I4acb3af11d459e9d5ebefe5abbb41e50e3ccf7f0 Reviewed-by: Thiago Macieira thiago.macieira@intel.com (cherry picked from commit b646c7b7)

Merge request reports