--- a/eric6/Snapshot/SnapshotRegionGrabber.py Mon Jan 04 16:52:56 2021 +0100 +++ b/eric6/Snapshot/SnapshotRegionGrabber.py Mon Jan 04 19:34:49 2021 +0100 @@ -9,9 +9,10 @@ from PyQt5.QtCore import pyqtSignal, Qt, QRect, QPoint, QTimer, QLocale from PyQt5.QtGui import ( - QPixmap, QColor, QRegion, QPainter, QPalette, QPaintEngine, QPen, QBrush + QPixmap, QColor, QRegion, QPainter, QPalette, QPaintEngine, QPen, QBrush, + QGuiApplication, QCursor ) -from PyQt5.QtWidgets import QWidget, QApplication, QToolTip +from PyQt5.QtWidgets import QWidget, QToolTip def drawRect(painter, rect, outline, fill=None): @@ -112,9 +113,14 @@ """ Private slot to initialize the rest of the widget. """ - self.__pixmap = QApplication.screens()[0].grabWindow(0) + screen = QGuiApplication.screens()[0] + self.__virtualGeometrie = screen.availableVirtualGeometry() + screen = QGuiApplication.screenAt(QCursor.pos()) + sgeom = screen.geometry() + self.__pixmap = screen.grabWindow( + 0, sgeom.x(), sgeom.y(), sgeom.width(), sgeom.height()) self.resize(self.__pixmap.size()) - self.move(0, 0) + self.move(sgeom.x(), sgeom.y()) self.setCursor(Qt.CrossCursor) self.show()