forked from openlp/openlp
Fix taking screenshots while using powerpoint or impress.
Fixes: https://launchpad.net/bugs/1532938
This commit is contained in:
parent
e6959992f9
commit
c8fd1b8338
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user