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;
}
pScreen->mmWidth * width / pScreen->width,
pScreen->mmHeight * height / pScreen->height);
#else
- return -1;
+ return 0;
#endif
}
crtc = rp->outputs[outputIdx]->crtc;
if (crtc == NULL)
- return 0;
+ return 1;
return RRCrtcSet(crtc, NULL, crtc->x, crtc->y, crtc->rotation, 0, NULL);
#else
- return -1;
+ return 0;
#endif
}
/* Couldn't find one... */
if (crtc == NULL)
- return -1;
+ return 0;
}
/* Make sure we have the mode we want */
mode = vncRandRCreatePreferredMode(output, width, height);
if (mode == NULL)
- return -1;
+ return 0;
/* Reconfigure new mode and position */
return RRCrtcSet(crtc, mode, x, y, crtc->rotation, 1, &output);
#else
- return -1;
+ return 0;
#endif
}
while (extraOutputs > 0) {
crtc = vncRandRCrtcCreate(screenInfo.screens[scrIdx]);
if (crtc == NULL)
- return -1;
+ return 0;
extraOutputs--;
}
- return 0;
+ return 1;
}
/* Used to create a preferred mode from various places */