mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fix screen grabbing for screenshots
This commit is contained in:
parent
eb1d70176d
commit
cf9ed8d580
|
@ -208,10 +208,11 @@ void ScreenshotGrabber::adjustWindowSize()
|
|||
|
||||
QPixmap ScreenshotGrabber::grabScreen()
|
||||
{
|
||||
QRect systemScreenRect = getSystemScreenRect();
|
||||
return QApplication::primaryScreen()->grabWindow(QApplication::desktop()->winId(),0,0,
|
||||
systemScreenRect.width(),
|
||||
systemScreenRect.height());
|
||||
QScreen* screen = QApplication::primaryScreen();
|
||||
if (screen)
|
||||
return screen->grabWindow(0);
|
||||
|
||||
return QPixmap();
|
||||
}
|
||||
|
||||
void ScreenshotGrabber::beginRectChooser(QGraphicsSceneMouseEvent* event)
|
||||
|
|
Loading…
Reference in New Issue
Block a user