|
|
@ -98,8 +98,9 @@ void UBScreenMirror::grabPixmap() |
|
|
|
// WHY HERE?
|
|
|
|
// 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
|
|
|
|
// 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
|
|
|
|
// what we have to grab. Not very good way of doing
|
|
|
|
WId windowID = qApp->desktop()->screen(mScreenIndex)->winId(); |
|
|
|
QDesktopWidget * desktop = QApplication::desktop(); |
|
|
|
mLastPixmap = QPixmap::grabWindow(windowID, mRect.x(), mRect.y(), mRect.width(), mRect.height()); |
|
|
|
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); |
|
|
|
mLastPixmap = mLastPixmap.scaled(width(), height(), Qt::KeepAspectRatio, Qt::SmoothTransformation); |
|
|
|