From f4b32c0580e96921c7ea9bcfb840044d3e17b946 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 13 Oct 2022 15:38:22 +0300 Subject: [PATCH] effects/screenshot: Avoid capturing hidden cursor BUG: 460358 --- src/effects/screenshot/screenshot.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/effects/screenshot/screenshot.cpp b/src/effects/screenshot/screenshot.cpp index 70cf2f74ee..c07502c388 100644 --- a/src/effects/screenshot/screenshot.cpp +++ b/src/effects/screenshot/screenshot.cpp @@ -378,6 +378,10 @@ QImage ScreenShotEffect::blitScreenshot(const QRect &geometry, qreal devicePixel void ScreenShotEffect::grabPointerImage(QImage &snapshot, int xOffset, int yOffset) const { + if (effects->isCursorHidden()) { + return; + } + const PlatformCursorImage cursor = effects->cursorImage(); if (cursor.image().isNull()) { return;