mirror of
https://github.com/fergalmoran/flameshot.git
synced 2026-02-14 14:33:58 +00:00
correct position of QScreen geometry on HiDPI multi-headed setup
This commit is contained in:
@@ -90,7 +90,10 @@ QPixmap ScreenGrabber::grabEntireDesktop(bool& ok)
|
||||
|
||||
QRect geometry;
|
||||
for (QScreen* const screen : QGuiApplication::screens()) {
|
||||
geometry = geometry.united(screen->geometry());
|
||||
QRect scrRect = screen->geometry();
|
||||
scrRect.moveTo(scrRect.x() / screen->devicePixelRatio(),
|
||||
scrRect.y() / screen->devicePixelRatio());
|
||||
geometry = geometry.united(scrRect);
|
||||
}
|
||||
|
||||
QPixmap p(QApplication::primaryScreen()->grabWindow(
|
||||
|
||||
Reference in New Issue
Block a user