]> source.dussan.org Git - tigervnc.git/commitdiff
Indented computeScreenLayout and setScreenLayout
authorPeter Åstrand (astrand) <astrand@cendio.se>
Wed, 7 Mar 2018 07:10:21 +0000 (08:10 +0100)
committerPeter Åstrand (astrand) <astrand@cendio.se>
Mon, 9 Apr 2018 08:04:05 +0000 (10:04 +0200)
Should use 2 spaces like the rest of the project.

unix/xserver/hw/vnc/XserverDesktop.cc

index c68a0775f1af39d142ef64a69bb54c912cca983e..6a428908b4dab5af2b9b2c05811d2c5c89b5096b 100644 (file)
@@ -201,38 +201,38 @@ ScreenSet XserverDesktop::computeScreenLayout()
   OutputIdMap newIdMap;
 
   for (int i = 0;i < vncRandRGetOutputCount(screenIndex);i++) {
-      intptr_t outputId;
-      int x, y, width, height;
-
-      /* Disabled? */
-      if (!vncRandRIsOutputEnabled(screenIndex, i))
-          continue;
-
-      outputId = vncRandRGetOutputId(screenIndex, i);
-
-      /* Known output? */
-      if (outputIdMap.count(outputId) == 1)
-        newIdMap[outputId] = outputIdMap[outputId];
-      else {
-        rdr::U32 id;
-        OutputIdMap::const_iterator iter;
-
-        while (true) {
-          id = rand();
-          for (iter = outputIdMap.begin();iter != outputIdMap.end();++iter) {
-            if (iter->second == id)
-              break;
-          }
-          if (iter == outputIdMap.end())
+    intptr_t outputId;
+    int x, y, width, height;
+
+    /* Disabled? */
+    if (!vncRandRIsOutputEnabled(screenIndex, i))
+      continue;
+
+    outputId = vncRandRGetOutputId(screenIndex, i);
+
+    /* Known output? */
+    if (outputIdMap.count(outputId) == 1)
+      newIdMap[outputId] = outputIdMap[outputId];
+    else {
+      rdr::U32 id;
+      OutputIdMap::const_iterator iter;
+
+      while (true) {
+        id = rand();
+        for (iter = outputIdMap.begin();iter != outputIdMap.end();++iter) {
+          if (iter->second == id)
             break;
         }
-
-        newIdMap[outputId] = id;
+        if (iter == outputIdMap.end())
+          break;
       }
 
-      vncRandRGetOutputDimensions(screenIndex, i, &x, &y, &width, &height);
+      newIdMap[outputId] = id;
+    }
+
+    vncRandRGetOutputDimensions(screenIndex, i, &x, &y, &width, &height);
 
-      layout.add_screen(Screen(newIdMap[outputId], x, y, width, height, 0));
+    layout.add_screen(Screen(newIdMap[outputId], x, y, width, height, 0));
   }
 
   /* Only keep the entries that are currently active */
@@ -731,7 +731,7 @@ unsigned int XserverDesktop::setScreenLayout(int fb_width, int fb_height,
 
     /* Shouldn't happen */
     if (i == vncRandRGetOutputCount(screenIndex))
-        return rfb::resultInvalid;
+      return rfb::resultInvalid;
 
     /*
      * Make sure we already have an entry for this, or