diff options
author | Peter Åstrand (astrand) <astrand@cendio.se> | 2018-03-07 08:21:42 +0100 |
---|---|---|
committer | Peter Åstrand (astrand) <astrand@cendio.se> | 2018-04-09 10:04:12 +0200 |
commit | e3aece4bac1b8c7cc2aadd824dbba4231665479f (patch) | |
tree | 75a2c641b1bb15da17fa19041115eb4629df135b /unix | |
parent | c24f899b9eac306609c516e957447676b6769681 (diff) | |
download | tigervnc-e3aece4bac1b8c7cc2aadd824dbba4231665479f.tar.gz tigervnc-e3aece4bac1b8c7cc2aadd824dbba4231665479f.zip |
Make vncRandRGetOutputId return the actual id; not a pointer
Less confusing, and compatible with libXrandr.
Diffstat (limited to 'unix')
-rw-r--r-- | unix/xserver/hw/vnc/XorgGlue.c | 4 | ||||
-rw-r--r-- | unix/xserver/hw/vnc/XorgGlue.h | 2 | ||||
-rw-r--r-- | unix/xserver/hw/vnc/XserverDesktop.cc | 6 | ||||
-rw-r--r-- | unix/xserver/hw/vnc/XserverDesktop.h | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/unix/xserver/hw/vnc/XorgGlue.c b/unix/xserver/hw/vnc/XorgGlue.c index 141023a8..baeac29d 100644 --- a/unix/xserver/hw/vnc/XorgGlue.c +++ b/unix/xserver/hw/vnc/XorgGlue.c @@ -290,11 +290,11 @@ int vncRandRDisableOutput(int scrIdx, int outputIdx) #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 63227ac3..dc78f5eb 100644 --- a/unix/xserver/hw/vnc/XorgGlue.h +++ b/unix/xserver/hw/vnc/XorgGlue.h @@ -65,7 +65,7 @@ int vncRandRDisableOutput(int scrIdx, int outputIdx); 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 6a428908..c47f507a 100644 --- a/unix/xserver/hw/vnc/XserverDesktop.cc +++ b/unix/xserver/hw/vnc/XserverDesktop.cc @@ -201,7 +201,7 @@ ScreenSet XserverDesktop::computeScreenLayout() 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 @@ unsigned int XserverDesktop::setScreenLayout(int fb_width, int fb_height, /* 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 @@ unsigned int XserverDesktop::setScreenLayout(int fb_width, int fb_height, 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 2a378ea1..b611402a 100644 --- a/unix/xserver/hw/vnc/XserverDesktop.h +++ b/unix/xserver/hw/vnc/XserverDesktop.h @@ -133,7 +133,7 @@ private: rfb::Timer queryConnectTimer; #ifdef RANDR - typedef std::map<intptr_t, rdr::U32> OutputIdMap; + typedef std::map<unsigned int, rdr::U32> OutputIdMap; OutputIdMap outputIdMap; #endif |