Fixed screenshot taking pixmap of entire desktop in multiscreen environment

preferencesAboutTextFull
Craig Watson 9 years ago
parent 82c349468e
commit 7e2b463853
  1. 7
      src/desktop/UBDesktopAnnotationController.cpp

@ -500,11 +500,12 @@ void UBDesktopAnnotationController::screenCapture()
QPixmap UBDesktopAnnotationController::getScreenPixmap() QPixmap UBDesktopAnnotationController::getScreenPixmap()
{ {
QDesktopWidget *desktop = QApplication::desktop(); QDesktopWidget *desktop = QApplication::desktop();
QScreen * screen = QApplication::primaryScreen(); QScreen * screen = QApplication::primaryScreen();
return screen->grabWindow(desktop->effectiveWinId());
QRect rect = desktop->screenGeometry(QCursor::pos());
return screen->grabWindow(desktop->effectiveWinId(),
rect.x(), rect.y(), rect.width(), rect.height());
} }

Loading…
Cancel
Save