1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix screen grabbing for screenshots

This commit is contained in:
Nils Fenner 2015-09-24 16:32:17 +02:00
parent eb1d70176d
commit cf9ed8d580
No known key found for this signature in database
GPG Key ID: 9591A163FF9BE04C

View File

@ -208,10 +208,11 @@ void ScreenshotGrabber::adjustWindowSize()
QPixmap ScreenshotGrabber::grabScreen()
{
QRect systemScreenRect = getSystemScreenRect();
return QApplication::primaryScreen()->grabWindow(QApplication::desktop()->winId(),0,0,
systemScreenRect.width(),
systemScreenRect.height());
QScreen* screen = QApplication::primaryScreen();
if (screen)
return screen->grabWindow(0);
return QPixmap();
}
void ScreenshotGrabber::beginRectChooser(QGraphicsSceneMouseEvent* event)