From 68236c19590992eb3968d5cfa81c3335e14d8b12 Mon Sep 17 00:00:00 2001 From: ArsenArsen Date: Mon, 3 Jul 2017 16:25:54 +0200 Subject: [PATCH] This bug only existed on Qt<5.9 Linux --- screenshotutil.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/screenshotutil.cpp b/screenshotutil.cpp index 90ea0ba..d0ec325 100644 --- a/screenshotutil.cpp +++ b/screenshotutil.cpp @@ -14,10 +14,12 @@ QPixmap screenshotutil::fullscreen(bool cursor) { // Hack for https://bugreports.qt.io/browse/QTBUG-58110 static QStringList qVer = QString(qVersion()).split('.'); +#ifdef Q_OS_LINUX if (qVer.at(0).toInt() == 5 && qVer.at(1).toInt() < 9) { image = window(0); painter.begin(&image); } else { +#endif int height = 0, width = 0; for (QScreen *screen : QApplication::screens()) { QRect geo = screen->geometry(); @@ -34,7 +36,10 @@ QPixmap screenshotutil::fullscreen(bool cursor) { painter.drawPixmap(screen->geometry().topLeft(), currentScreen); width += screen->size().width(); } +#ifdef Q_OS_LINUX } +#endif + #ifdef PLATFORM_CAPABILITY_CURSOR if (cursor) { auto cursorData = PlatformBackend::inst().getCursor();