Fixed partial screenshot in desktop mode

Note: the screenshot can only be taken on the primary display now
(rather than on the display in which the mouse is, as was the case
before).
preferencesAboutTextFull
Craig Watson 9 years ago
parent d6503534db
commit c6cc0d3a19
  1. 3
      src/desktop/UBCustomCaptureWindow.cpp
  2. 8
      src/desktop/UBDesktopAnnotationController.cpp

@ -74,8 +74,7 @@ int UBCustomCaptureWindow::execute(const QPixmap &pScreenPixmap)
QDesktopWidget *desktop = QApplication::desktop();
int currentScreen = desktop->screenNumber(QCursor::pos());
setGeometry(desktop->screenGeometry(currentScreen));
UBPlatformUtils::showFullScreen(this);
this->show();
setWindowOpacity(1.0);
return exec();

@ -501,12 +501,10 @@ QPixmap UBDesktopAnnotationController::getScreenPixmap()
{
QDesktopWidget *desktop = QApplication::desktop();
// we capture the screen in which the mouse is.
const QRect primaryScreenRect = desktop->screenGeometry(QCursor::pos());
QCoreApplication::flush();
return QPixmap::grabWindow(desktop->winId(), primaryScreenRect.x()
, primaryScreenRect.y(), primaryScreenRect.width(), primaryScreenRect.height());
QScreen * screen = QApplication::primaryScreen();
return screen->grabWindow(desktop->effectiveWinId());
}

Loading…
Cancel
Save