From: Peter Åstrand (astrand) Date: Wed, 7 Mar 2018 07:10:21 +0000 (+0100) Subject: Indented computeScreenLayout and setScreenLayout X-Git-Tag: v1.8.90~25^2~14 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c24f899b9eac306609c516e957447676b6769681;p=tigervnc.git Indented computeScreenLayout and setScreenLayout Should use 2 spaces like the rest of the project. --- diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc index c68a0775..6a428908 100644 --- a/unix/xserver/hw/vnc/XserverDesktop.cc +++ b/unix/xserver/hw/vnc/XserverDesktop.cc @@ -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