diff options
author | Peter Åstrand (astrand) <astrand@cendio.se> | 2018-03-20 08:15:41 +0100 |
---|---|---|
committer | Peter Åstrand (astrand) <astrand@cendio.se> | 2018-04-09 20:28:58 +0200 |
commit | a61c6f2a24416b5dccb9517e3d85759ea7405dc8 (patch) | |
tree | bc1a43131a49590ef744bde58502e1df382407af /unix/xserver | |
parent | 396f8c9fb5847c1959f1e18231969a923b9e6066 (diff) | |
download | tigervnc-a61c6f2a24416b5dccb9517e3d85759ea7405dc8.tar.gz tigervnc-a61c6f2a24416b5dccb9517e3d85759ea7405dc8.zip |
Select the correct output for new screens
For example, if we have earlier disabled an output because it was too
large for the framebuffer, we should prefer this output when
allocating new outputs.
Move the code that turn off unused outputs to the end.
Also, add support for checking the output connection state.
Diffstat (limited to 'unix/xserver')
-rw-r--r-- | unix/xserver/hw/vnc/RandrGlue.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/unix/xserver/hw/vnc/RandrGlue.c b/unix/xserver/hw/vnc/RandrGlue.c index 214b1d0d..dc8512bd 100644 --- a/unix/xserver/hw/vnc/RandrGlue.c +++ b/unix/xserver/hw/vnc/RandrGlue.c @@ -173,6 +173,16 @@ int vncRandRIsOutputUsable(int outputIdx) return 0; } +int vncRandRIsOutputConnected(int outputIdx) +{ + rrScrPrivPtr rp = rrGetScrPriv(screenInfo.screens[scrIdx]); + + RROutputPtr output; + + output = rp->outputs[outputIdx]; + return (output->connection == RR_Connected); +} + int vncRandRDisableOutput(int outputIdx) { rrScrPrivPtr rp = rrGetScrPriv(screenInfo.screens[scrIdx]); |