From 64f7e6c63da48cf35a58d7263b7edf9cb1820a0f Mon Sep 17 00:00:00 2001 From: PKEv Date: Thu, 28 May 2015 00:23:26 +0300 Subject: [PATCH] Correct screenshot 2nd monitor but only if a second monitor on the right side --- src/widget/tool/screenshotgrabber.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/widget/tool/screenshotgrabber.cpp b/src/widget/tool/screenshotgrabber.cpp index 00ea9905b..0e713adb6 100644 --- a/src/widget/tool/screenshotgrabber.cpp +++ b/src/widget/tool/screenshotgrabber.cpp @@ -178,8 +178,12 @@ void ScreenshotGrabber::adjustWindowSize() this->overlay->setRect(systemScreenRect); } -QPixmap ScreenshotGrabber::grabScreen() { - return QApplication::primaryScreen()->grabWindow(QApplication::desktop()->winId()); +QPixmap ScreenshotGrabber::grabScreen() +{ + QRect systemScreenRect = getSystemScreenRect(); + return QApplication::primaryScreen()->grabWindow(QApplication::desktop()->winId(),0,0, + systemScreenRect.width(), + systemScreenRect.height()); } void ScreenshotGrabber::beginRectChooser(QGraphicsSceneMouseEvent* event)