summaryrefslogtreecommitdiffstats
path: root/unix/xserver/hw/vnc/XserverDesktop.cc
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2012-07-12 12:40:50 +0000
committerPierre Ossman <ossman@cendio.se>2012-07-12 12:40:50 +0000
commit1d3be39bcd8ed3b061f2d354454fb7ed0f174b40 (patch)
tree507f2dfe28d4d1fb1c8cf2f58c08bd9ad3570db2 /unix/xserver/hw/vnc/XserverDesktop.cc
parent4c81ff45668ba682eb5d3a9f7080d8b14218c040 (diff)
downloadtigervnc-1d3be39bcd8ed3b061f2d354454fb7ed0f174b40.tar.gz
tigervnc-1d3be39bcd8ed3b061f2d354454fb7ed0f174b40.zip
Track outputs instead of CRTCs, as those better match the screen concept
in RFB. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4932 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix/xserver/hw/vnc/XserverDesktop.cc')
-rw-r--r--unix/xserver/hw/vnc/XserverDesktop.cc28
1 files changed, 15 insertions, 13 deletions
diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc
index 6b1c2d9d..45aa468a 100644
--- a/unix/xserver/hw/vnc/XserverDesktop.cc
+++ b/unix/xserver/hw/vnc/XserverDesktop.cc
@@ -237,45 +237,47 @@ ScreenSet XserverDesktop::computeScreenLayout()
layout.add_screen(Screen(0, 0, 0, pScreen->width, pScreen->height, 0));
#else
rrScrPrivPtr rp = rrGetScrPriv(pScreen);
- CrtcIdMap newIdMap;
+ OutputIdMap newIdMap;
- for (int i = 0;i < rp->numCrtcs;i++) {
+ for (int i = 0;i < rp->numOutputs;i++) {
+ RROutputPtr output;
RRCrtcPtr crtc;
- crtc = rp->crtcs[i];
+ output = rp->outputs[i];
+ crtc = output->crtc;
/* Disabled? */
- if (crtc->mode == NULL)
+ if ((crtc == NULL) || (crtc->mode == NULL))
continue;
- /* Known CRTC? */
- if (crtcIdMap.count(crtc) == 1)
- newIdMap[crtc] = crtcIdMap[crtc];
+ /* Known output? */
+ if (outputIdMap.count(output) == 1)
+ newIdMap[output] = outputIdMap[output];
else {
rdr::U32 id;
- CrtcIdMap::const_iterator iter;
+ OutputIdMap::const_iterator iter;
while (true) {
id = rand();
- for (iter = crtcIdMap.begin();iter != crtcIdMap.end();++iter) {
+ for (iter = outputIdMap.begin();iter != outputIdMap.end();++iter) {
if (iter->second == id)
break;
}
- if (iter == crtcIdMap.end())
+ if (iter == outputIdMap.end())
break;
}
- newIdMap[crtc] = id;
+ newIdMap[output] = id;
}
- layout.add_screen(Screen(newIdMap[crtc], crtc->x, crtc->y,
+ layout.add_screen(Screen(newIdMap[output], crtc->x, crtc->y,
crtc->mode->mode.width,
crtc->mode->mode.height,
0));
}
/* Only keep the entries that are currently active */
- crtcIdMap = newIdMap;
+ outputIdMap = newIdMap;
#endif
return layout;