Fix taking screenshots while using powerpoint or impress.

Fixes: https://launchpad.net/bugs/1532938
This commit is contained in:
Tomas Groth 2016-01-11 22:13:57 +01:00
parent e6959992f9
commit c8fd1b8338
1 changed files with 2 additions and 1 deletions

View File

@ -1138,8 +1138,9 @@ class SlideController(DisplayController, RegistryProperties):
Creates an image of the current screen and updates the preview frame.
"""
win_id = QtWidgets.QApplication.desktop().winId()
screen = QtWidgets.QApplication.primaryScreen()
rect = self.screens.current['size']
win_image = QtGui.QScreen.grabWindow(win_id, rect.x(), rect.y(), rect.width(), rect.height())
win_image = screen.grabWindow(win_id, rect.x(), rect.y(),rect.width(), rect.height())
win_image.setDevicePixelRatio(self.slide_preview.devicePixelRatio())
self.slide_preview.setPixmap(win_image)
self.slide_image = win_image