[Differential] [Request, 105 lines] D3412: [effects] Add a screenshot dbus method which takes a file descriptor

graesslin (Martin Gräßlin) noreply at phabricator.kde.org
Fri Nov 18 09:09:06 UTC 2016


graesslin created this revision.
graesslin added reviewers: KWin, Plasma on Wayland.
Restricted Application added subscribers: kwin, plasma-devel.
Restricted Application added projects: Plasma on Wayland, KWin.

REVISION SUMMARY
  The idea behind this mode is to support applications like spectacle
  (see https://phabricator.kde.org/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.

REPOSITORY
  rKWIN KWin

BRANCH
  screenshot-fd-variant

REVISION DETAIL
  https://phabricator.kde.org/D3412

AFFECTED FILES
  effects/screenshot/screenshot.cpp
  effects/screenshot/screenshot.h
  main_wayland.cpp
  main_x11.cpp

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: graesslin, #kwin, #plasma_on_wayland
Cc: plasma-devel, kwin, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20161118/2637c11c/attachment.html>


More information about the Plasma-devel mailing list