|
|
|
@ -98,8 +98,9 @@ void UBScreenMirror::grabPixmap() |
|
|
|
|
// WHY HERE?
|
|
|
|
|
// this is the case we are showing the desktop but the is no widget and we use the last widget rectagle to know
|
|
|
|
|
// what we have to grab. Not very good way of doing
|
|
|
|
|
WId windowID = qApp->desktop()->screen(mScreenIndex)->winId(); |
|
|
|
|
mLastPixmap = QPixmap::grabWindow(windowID, mRect.x(), mRect.y(), mRect.width(), mRect.height()); |
|
|
|
|
QDesktopWidget * desktop = QApplication::desktop(); |
|
|
|
|
QScreen * screen = QApplication::primaryScreen(); |
|
|
|
|
mLastPixmap = screen->grabWindow(desktop->effectiveWinId(), mRect.x(), mRect.y(), mRect.width(), mRect.height()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
mLastPixmap = mLastPixmap.scaled(width(), height(), Qt::KeepAspectRatio, Qt::SmoothTransformation); |
|
|
|
|