Commit c6cc0d3a authored by Craig Watson's avatar Craig Watson

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).
parent d6503534
......@@ -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());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment