diff --git a/ImageProcessing.cpp b/ImageProcessing.cpp index 2e25dff..6b0c3cb 100644 --- a/ImageProcessing.cpp +++ b/ImageProcessing.cpp @@ -2,11 +2,11 @@ #include -#include - #include "ImageProcessing.h" #include "StAssert.h" +#define MAX_INT16 32767 + #if defined(Q_OS_LINUX) # include # include diff --git a/Manager.cpp b/Manager.cpp index 7f3a6f9..7622bd8 100644 --- a/Manager.cpp +++ b/Manager.cpp @@ -246,8 +246,18 @@ void Manager::capture () { QList screens = QApplication::screens (); foreach (QScreen * screen, screens) { QRect geometry = screen->availableGeometry (); - QPixmap pixmap = screen->grabWindow (0, geometry.x (), geometry.y (), + #if QT_VERSION >= QT_VERSION_CHECK(5,10,0) + QPixmap pixmap = screen->grabWindow (0, 0, 0, geometry.width (), geometry.height ()); + #else + #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) + QPixmap pixmap = screen->grabWindow (0, geometry.x (), geometry.y (), + geometry.width (), geometry.height ()); + #else + assert c(0 && "Qt version is too small"); + #endif + #endif + QString name = screen->name (); if (!selections_.contains (name)) { SelectionDialog *selection = new SelectionDialog (*dictionary_);