<table><tr><td style="">graesslin created this revision.<br />graesslin added reviewers: Plasma on Wayland, bgupta.<br />Restricted Application added a subscriber: plasma-devel.<br />Restricted Application added a project: Plasma on Wayland.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D3413" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This new ImageGrabber makes use of the new DBus interface introduced<br />
with <a href="https://phabricator.kde.org/D3412" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">D3412</a> in KWin.</p>
<p>Taking a screen shot on Wayland is significantly different to how<br />
screenshot taking on X11 works. No application is able to access a<br />
window buffer or even able to figure out which window is at a given<br />
mouse position.</p>
<p>Due to that the complete interaction needs to go through the compositor.<br />
The only supported mode is thus window under cursor with click. There is<br />
no other mode available. The idea is to keep the user always under<br />
control of the screen shot taking - a security feature.</p>
<p>Full screen shot or screen region shot is currently not yet supported.</p>
<p>Explaining the dbus interaction: spectacle creates a pipe fd which gets<br />
passed to the compositor through the dbus call. It starts to read from<br />
the pipe in a dedicated thread (to keep gui thread responsive) with a<br />
timeout of 30 sec. Spectacle doesn't know when the user clicks, so a<br />
reasonable timeout is required.</p>
<p>In case the user cancels the selection or clicks a "non window"<br />
spectacle cannot know that and will read an empty image from the pipe.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>rSPECTACLE Spectacle</div></div></div><br /><div><strong>BRANCH</strong><div><div>kwin-wayland</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D3413" rel="noreferrer">https://phabricator.kde.org/D3413</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>CMakeLists.txt<br />
src/CMakeLists.txt<br />
src/PlatformBackends/KWinWaylandImageGrabber.cpp<br />
src/PlatformBackends/KWinWaylandImageGrabber.h<br />
src/SpectacleCore.cpp</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>graesslin, Plasma on Wayland, bgupta<br /><strong>Cc: </strong>plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas<br /></div>