]> source.dussan.org Git - tigervnc.git/commitdiff
Avoid disabling outputs which are already disabled
authorPeter Åstrand (astrand) <astrand@cendio.se>
Tue, 20 Mar 2018 09:26:40 +0000 (10:26 +0100)
committerPeter Åstrand (astrand) <astrand@cendio.se>
Mon, 9 Apr 2018 18:28:58 +0000 (20:28 +0200)
Better to avoid making unnecessary calls, but mainly we want to avoid
logging false errors.

unix/common/randr.cxx

index 76ae0bc34453b6c6fe127660e1fe7f023e03921a..9cfc95dd9dfb713af377f8b54909aac54768e150 100644 (file)
@@ -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) {