Fix compilation on Windows, fix glitch that could cause windows to appear off the actual screen with no way to get them back.

This commit is contained in:
Collin Kidder
2020-11-15 01:30:13 -08:00
parent 80523f2eeb
commit b345495178
21 changed files with 41 additions and 20 deletions
+16
View File
@@ -6,6 +6,9 @@
#include <QByteArray>
#include <QDateTime>
#include <QDebug>
#include <QApplication>
#include <QRect>
#include <QDesktopWidget>
class Utility
{
@@ -16,6 +19,19 @@ public:
static bool sysTimeMode;
static QString timeFormat;
//determines whether the window position is within any available screens. If it is not we default
//back to 0,0 which is going to be on screen. This fixes a problem where some operating systems would
//otherwise let you put windows on a second monitor, disconnect that monitor, and still put windows on it.
static QPoint constrainedWindowPos(QPoint originalPos)
{
QScreen *screen = QGuiApplication::screenAt(originalPos);
if (!screen)
{
return QPoint(0,0);
}
return originalPos;
}
static QString unQuote(QString inStr)
{
QStringList temp;