From c173c5e9f592a5bd2f5e5249bc06b7530070e787 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 10 Sep 2018 13:40:00 +0200 Subject: Fix compilation of xx.cpp --- src/xx.cpp | 8 ++++---- 1 file 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(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); -- cgit v1.2.3-55-g7522