Commit b851ca17 authored by David Redondo's avatar David Redondo 🏎

Disconnect after receiving screenshot signal

Summary:
Only the Spectacle instance that requested a screenshot will receive it.
BUG:412186

Reviewers: meven, #spectacle

Reviewed By: meven

Tags: #spectacle

Differential Revision: https://phabricator.kde.org/D29620
parent 0b6b280c
......@@ -461,6 +461,10 @@ QPixmap PlatformXcb::getWindowPixmap(xcb_window_t theWindow, bool theBlendPointe
void PlatformXcb::handleKWinScreenshotReply(quint64 theDrawable)
{
QDBusConnection::sessionBus().disconnect(QStringLiteral("org.kde.KWin"), QStringLiteral("/Screenshot"),
QStringLiteral("org.kde.kwin.Screenshot"), QStringLiteral("screenshotCreated"),
this, SLOT(handleKWinScreenshotReply(quint64)));
// obtain width and height and grab an image (x and y are always zero for pixmaps)
auto lDrawable = static_cast<xcb_drawable_t>(theDrawable);
auto lRect = getDrawableGeometry(lDrawable);
......
Markdown is supported
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