summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2018-09-10 13:40:00 +0200
committerSimon Rettberg2018-09-10 13:40:00 +0200
commitc173c5e9f592a5bd2f5e5249bc06b7530070e787 (patch)
tree55ceaa37b3512c528c74416da4a225864d90f6a4
parentFix compilation of main.cpp (diff)
downloadbeamergui-c173c5e9f592a5bd2f5e5249bc06b7530070e787.tar.gz
beamergui-c173c5e9f592a5bd2f5e5249bc06b7530070e787.tar.xz
beamergui-c173c5e9f592a5bd2f5e5249bc06b7530070e787.zip
Fix compilation of xx.cpp
-rw-r--r--src/xx.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xx.cpp b/src/xx.cpp
index 0707f8b..a5f9d92 100644
--- a/src/xx.cpp
+++ b/src/xx.cpp
@@ -259,7 +259,7 @@ bool ScreenSetup::createMode(unsigned int resX, unsigned int resY, float refresh
m.id = 0;
m.name = ba.data();
m.nameLength= static_cast<unsigned int>(ba.length());
- m.modeFlags = RR_VSyncPositive | RR_HSyncNegative;
+ m.modeFlags = RR_VSyncPositive | RR_HSyncNegative;
free(mode);
for (XRRModeInfo *mode : a->_modeMap) {
@@ -299,16 +299,16 @@ bool ScreenSetup::setCenteredClone()
for (auto oi : a->_outputMap) {
auto mode = a->getPreferredMode(oi, fallback);
if (mode != nullptr) {
- if (mode->width > screenSize.width()) {
+ if (int(mode->width) > screenSize.width()) {
screenSize.setWidth(mode->width);
}
- if (mode->height > screenSize.height()) {
+ if (int(mode->height) > screenSize.height()) {
screenSize.setHeight(mode->height);
}
// TODO: CENTER
const int x = (screenSize.width() - mode->width) / 2;
const int y = (screenSize.height() - mode->height) / 2;
- ok = a->setOutputResolution(oi, 0, 0, QSize(int(mode->width), int(mode->height))) || ok;
+ ok = a->setOutputResolution(oi, x, y, QSize(int(mode->width), int(mode->height))) || ok;
}
}
a->setScreenSize(screenSize);