From c8fd1b8338df423abcc1612824360dd71df3bae3 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Mon, 11 Jan 2016 22:13:57 +0100 Subject: [PATCH] Fix taking screenshots while using powerpoint or impress. Fixes: https://launchpad.net/bugs/1532938 --- openlp/core/ui/slidecontroller.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index f93c52c06..359ae341f 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -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