Skip to content
Commit fbab2049 authored by Martin Flöser's avatar Martin Flöser
Browse files

[effects] Add a screenshot dbus method which takes a file descriptor

Summary:
The idea behind this mode is to support applications like spectacle
(see T4458). The calling application passes a file descriptor (created
through e.g. a pipe) and the screenshot effect writes the captured image
into that fd.

The advantage over the existing variant which writes to a file in the
/tmp directory is that this is peer-to-peer between the requesting
application and KWin. No other application can get to that image.

The change also includes setting SIGPIPE to ignore. It showed that when
the reading side already cancelled the read prior to KWin writing out
the image we get a SIGPIPE which results in application termination,
which is not what we want in case of a Wayland compositor. The sigpipe
can be ignored as Qt (and libpng) handles that error just fine at
runtime.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3412
parent cfdc1acb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment