aboutsummaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorPeter Åstrand (astrand) <astrand@cendio.se>2018-03-07 08:10:21 +0100
committerPeter Åstrand (astrand) <astrand@cendio.se>2018-04-09 10:04:05 +0200
commitc24f899b9eac306609c516e957447676b6769681 (patch)
tree7ff16316c1b39504605743b4af259e34a335662f /unix
parent4ae358d561463f1a2dc763fec885be5e4932f394 (diff)
downloadtigervnc-c24f899b9eac306609c516e957447676b6769681.tar.gz
tigervnc-c24f899b9eac306609c516e957447676b6769681.zip
Indented computeScreenLayout and setScreenLayout
Should use 2 spaces like the rest of the project.
Diffstat (limited to 'unix')
-rw-r--r--unix/xserver/hw/vnc/XserverDesktop.cc56
1 files changed, 28 insertions, 28 deletions
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