Corrected RandR wrapper return codes
In RandR land, there's a lot of return code confusion. Our wrappers
are using the same return codes as RRCrtcSet, RRScreenSizeSet: 1/TRUE
for success. Fixes:
* vncRandRCreateOutputs did not follow this convention
* A lot of code returned -1 upon failure
* vncRandRDisableOutput returned 0 for already disabled outputs
diff --git a/unix/common/randr.cxx b/unix/common/randr.cxx
index 44e46de..08bd45e 100644
--- a/unix/common/randr.cxx
+++ b/unix/common/randr.cxx
@@ -113,7 +113,7 @@
layout.num_screens() - availableOutputs);
ret = vncRandRCreateOutputs(screenIndex,
layout.num_screens() - availableOutputs);
- if (ret < 0) {
+ if (!ret) {
vlog.error("Unable to create more screens, as needed by the new client layout.");
return rfb::resultInvalid;
}