summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorPeter Åstrand (astrand) <astrand@cendio.se>2018-03-20 10:26:40 +0100
committerPeter Åstrand (astrand) <astrand@cendio.se>2018-04-09 20:28:58 +0200
commit8fcf6cc65971ffe5384384c8fede568877e3a032 (patch)
treedbc74afd866b894e55a4abd72f3a2d3568f217f0 /unix
parenta61c6f2a24416b5dccb9517e3d85759ea7405dc8 (diff)
downloadtigervnc-8fcf6cc65971ffe5384384c8fede568877e3a032.tar.gz
tigervnc-8fcf6cc65971ffe5384384c8fede568877e3a032.zip
Avoid disabling outputs which are already disabled
Better to avoid making unnecessary calls, but mainly we want to avoid logging false errors.
Diffstat (limited to 'unix')
-rw-r--r--unix/common/randr.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/unix/common/randr.cxx b/unix/common/randr.cxx
index 76ae0bc3..9cfc95dd 100644
--- a/unix/common/randr.cxx
+++ b/unix/common/randr.cxx
@@ -300,6 +300,10 @@ unsigned int setScreenLayout(int fb_width, int fb_height, const rfb::ScreenSet&
if (outputIdMap->count(output) == 1)
continue;
+ /* Enabled? */
+ if (!vncRandRIsOutputEnabled(i))
+ continue;
+
/* Disable and move on... */
ret = vncRandRDisableOutput(i);
if (!ret) {