diff options
author | Simon Rettberg | 2020-02-16 10:24:21 +0100 |
---|---|---|
committer | Simon Rettberg | 2020-02-16 10:24:21 +0100 |
commit | ff570027f607016e2b263fedac1bda619a65e64e (patch) | |
tree | 0226d1ae35fe0e7447b2a7f6f64add6d3e37ce1f /src/xx.cpp | |
parent | Use xrandr to actually set resolutions (diff) | |
download | beamergui-ff570027f607016e2b263fedac1bda619a65e64e.tar.gz beamergui-ff570027f607016e2b263fedac1bda619a65e64e.tar.xz beamergui-ff570027f607016e2b263fedac1bda619a65e64e.zip |
Fix xrandr command line for positioning...
Diffstat (limited to 'src/xx.cpp')
-rw-r--r-- | src/xx.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -67,7 +67,7 @@ public: for (int i = 0; i < e->noutput; ++i) { auto *oi = x->_outputMap[e->outputs[i]]; cmd << "--output" << oi->outputName << "--mode" << mode->name << "--rate" << rate; - cmd << "--x" << QString::number(oi->crtc->x) << "--y" << QString::number(oi->crtc->y); + cmd << "--pos" << QString::asprintf("%dx%d", oi->crtc->x, oi->crtc->y); if (oi->crtc->x == 0 && oi->crtc->y == 0 && !cmd.contains("--primary")) { cmd << "--primary"; } @@ -614,8 +614,10 @@ bool ScreenSetup::runXrandr(QStringList &cmd) } } qDebug() << "XRANDR:" << cmd; - if (CommandLine::testMode()) - return true; + if (CommandLine::testMode()) { + cmd << "--dryrun"; + } + proc.setProcessChannelMode(QProcess::ProcessChannelMode::ForwardedChannels); proc.start("xrandr", cmd); proc.waitForFinished(5000); if (proc.state() == QProcess::Running) { |