Browse Source

fix screen grabbing for screenshots

pull/2289/head
Nils Fenner 10 years ago
parent
commit
cf9ed8d580
No known key found for this signature in database
GPG Key ID: 9591A163FF9BE04C
  1. 9
      src/widget/tool/screenshotgrabber.cpp

9
src/widget/tool/screenshotgrabber.cpp

@ -208,10 +208,11 @@ void ScreenshotGrabber::adjustWindowSize() @@ -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)

Loading…
Cancel
Save