From b5edb04f112cf41c4a85871c56652793e2989323 Mon Sep 17 00:00:00 2001 From: ArsenArsen Date: Mon, 3 Jul 2017 16:23:44 +0200 Subject: [PATCH] Fix a logic error --- screenshotutil.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/screenshotutil.cpp b/screenshotutil.cpp index 306856f..90ea0ba 100644 --- a/screenshotutil.cpp +++ b/screenshotutil.cpp @@ -15,6 +15,9 @@ QPixmap screenshotutil::fullscreen(bool cursor) { // Hack for https://bugreports.qt.io/browse/QTBUG-58110 static QStringList qVer = QString(qVersion()).split('.'); if (qVer.at(0).toInt() == 5 && qVer.at(1).toInt() < 9) { + image = window(0); + painter.begin(&image); + } else { int height = 0, width = 0; for (QScreen *screen : QApplication::screens()) { QRect geo = screen->geometry(); @@ -31,9 +34,6 @@ QPixmap screenshotutil::fullscreen(bool cursor) { painter.drawPixmap(screen->geometry().topLeft(), currentScreen); width += screen->size().width(); } - } else { - image = window(0); - painter.begin(&image); } #ifdef PLATFORM_CAPABILITY_CURSOR if (cursor) {