[Differential] [Request, 202 lines] D3413: Introduce a KWin/Wayland image grabber
graesslin (Martin Gräßlin)
noreply at phabricator.kde.org
Fri Nov 18 09:17:05 UTC 2016
graesslin created this revision.
graesslin added reviewers: Plasma on Wayland, bgupta.
Restricted Application added a subscriber: plasma-devel.
Restricted Application added a project: Plasma on Wayland.
REVISION SUMMARY
This new ImageGrabber makes use of the new DBus interface introduced
with https://phabricator.kde.org/D3412 in KWin.
Taking a screen shot on Wayland is significantly different to how
screenshot taking on X11 works. No application is able to access a
window buffer or even able to figure out which window is at a given
mouse position.
Due to that the complete interaction needs to go through the compositor.
The only supported mode is thus window under cursor with click. There is
no other mode available. The idea is to keep the user always under
control of the screen shot taking - a security feature.
Full screen shot or screen region shot is currently not yet supported.
Explaining the dbus interaction: spectacle creates a pipe fd which gets
passed to the compositor through the dbus call. It starts to read from
the pipe in a dedicated thread (to keep gui thread responsive) with a
timeout of 30 sec. Spectacle doesn't know when the user clicks, so a
reasonable timeout is required.
In case the user cancels the selection or clicks a "non window"
spectacle cannot know that and will read an empty image from the pipe.
REPOSITORY
rSPECTACLE Spectacle
BRANCH
kwin-wayland
REVISION DETAIL
https://phabricator.kde.org/D3413
AFFECTED FILES
CMakeLists.txt
src/CMakeLists.txt
src/PlatformBackends/KWinWaylandImageGrabber.cpp
src/PlatformBackends/KWinWaylandImageGrabber.h
src/SpectacleCore.cpp
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: graesslin, #plasma_on_wayland, bgupta
Cc: plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20161118/eba57be6/attachment.html>
More information about the Plasma-devel
mailing list