Make vncRandRGetOutputId return the actual id; not a pointer
Less confusing, and compatible with libXrandr.
diff --git a/unix/xserver/hw/vnc/XorgGlue.c b/unix/xserver/hw/vnc/XorgGlue.c
index 141023a..baeac29 100644
--- a/unix/xserver/hw/vnc/XorgGlue.c
+++ b/unix/xserver/hw/vnc/XorgGlue.c
@@ -290,11 +290,11 @@
#endif
}
-intptr_t vncRandRGetOutputId(int scrIdx, int outputIdx)
+unsigned int vncRandRGetOutputId(int scrIdx, int outputIdx)
{
#ifdef RANDR
rrScrPrivPtr rp = rrGetScrPriv(screenInfo.screens[scrIdx]);
- return (intptr_t)rp->outputs[outputIdx];
+ return rp->outputs[outputIdx]->id;
#else
return 0;
#endif
diff --git a/unix/xserver/hw/vnc/XorgGlue.h b/unix/xserver/hw/vnc/XorgGlue.h
index 63227ac..dc78f5e 100644
--- a/unix/xserver/hw/vnc/XorgGlue.h
+++ b/unix/xserver/hw/vnc/XorgGlue.h
@@ -65,7 +65,7 @@
int vncRandRReconfigureOutput(int scrIdx, int outputIdx, int x, int y,
int width, int height);
-intptr_t vncRandRGetOutputId(int scrIdx, int outputIdx);
+unsigned int vncRandRGetOutputId(int scrIdx, int outputIdx);
void vncRandRGetOutputDimensions(int scrIdx, int outputIdx,
int *x, int *y, int *width, int *height);
diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc
index 6a42890..c47f507 100644
--- a/unix/xserver/hw/vnc/XserverDesktop.cc
+++ b/unix/xserver/hw/vnc/XserverDesktop.cc
@@ -201,7 +201,7 @@
OutputIdMap newIdMap;
for (int i = 0;i < vncRandRGetOutputCount(screenIndex);i++) {
- intptr_t outputId;
+ unsigned int outputId;
int x, y, width, height;
/* Disabled? */
@@ -654,7 +654,7 @@
/* Next, reconfigure all known outputs, and turn off the other ones */
for (int i = 0;i < vncRandRGetOutputCount(screenIndex);i++) {
- intptr_t output;
+ unsigned int output;
ScreenSet::const_iterator iter;
@@ -702,7 +702,7 @@
ScreenSet::const_iterator iter;
for (iter = layout.begin();iter != layout.end();++iter) {
OutputIdMap::const_iterator oi;
- intptr_t output;
+ unsigned int output;
int i;
/* Does this screen have an output already? */
diff --git a/unix/xserver/hw/vnc/XserverDesktop.h b/unix/xserver/hw/vnc/XserverDesktop.h
index 2a378ea..b611402 100644
--- a/unix/xserver/hw/vnc/XserverDesktop.h
+++ b/unix/xserver/hw/vnc/XserverDesktop.h
@@ -133,7 +133,7 @@
rfb::Timer queryConnectTimer;
#ifdef RANDR
- typedef std::map<intptr_t, rdr::U32> OutputIdMap;
+ typedef std::map<unsigned int, rdr::U32> OutputIdMap;
OutputIdMap outputIdMap;
#endif