This bug only existed on Qt<5.9 Linux
This commit is contained in:
parent
b5edb04f11
commit
68236c1959
@ -14,10 +14,12 @@ QPixmap screenshotutil::fullscreen(bool cursor) {
|
|||||||
|
|
||||||
// Hack for https://bugreports.qt.io/browse/QTBUG-58110
|
// Hack for https://bugreports.qt.io/browse/QTBUG-58110
|
||||||
static QStringList qVer = QString(qVersion()).split('.');
|
static QStringList qVer = QString(qVersion()).split('.');
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
if (qVer.at(0).toInt() == 5 && qVer.at(1).toInt() < 9) {
|
if (qVer.at(0).toInt() == 5 && qVer.at(1).toInt() < 9) {
|
||||||
image = window(0);
|
image = window(0);
|
||||||
painter.begin(&image);
|
painter.begin(&image);
|
||||||
} else {
|
} else {
|
||||||
|
#endif
|
||||||
int height = 0, width = 0;
|
int height = 0, width = 0;
|
||||||
for (QScreen *screen : QApplication::screens()) {
|
for (QScreen *screen : QApplication::screens()) {
|
||||||
QRect geo = screen->geometry();
|
QRect geo = screen->geometry();
|
||||||
@ -34,7 +36,10 @@ QPixmap screenshotutil::fullscreen(bool cursor) {
|
|||||||
painter.drawPixmap(screen->geometry().topLeft(), currentScreen);
|
painter.drawPixmap(screen->geometry().topLeft(), currentScreen);
|
||||||
width += screen->size().width();
|
width += screen->size().width();
|
||||||
}
|
}
|
||||||
|
#ifdef Q_OS_LINUX
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef PLATFORM_CAPABILITY_CURSOR
|
#ifdef PLATFORM_CAPABILITY_CURSOR
|
||||||
if (cursor) {
|
if (cursor) {
|
||||||
auto cursorData = PlatformBackend::inst().getCursor();
|
auto cursorData = PlatformBackend::inst().getCursor();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user