void vncClientCutText(const char* str, int len)
{
+ xVncExtClientCutTextNotifyEvent ev;
+
if (clientCutText != NULL)
free(clientCutText);
clientCutTextLen = 0;
memcpy(clientCutText, str, len);
clientCutTextLen = len;
- xVncExtClientCutTextNotifyEvent ev;
ev.type = vncEventBase + VncExtClientCutTextNotify;
for (struct VncInputSelect* cur = vncInputSelectHead; cur; cur = cur->next) {
if (cur->mask & VncExtClientCutTextMask) {
static int ProcVncExtSetParam(ClientPtr client)
{
char *param;
+ xVncExtSetParamReply rep;
REQUEST(xVncExtSetParamReq);
REQUEST_FIXED_SIZE(xVncExtSetParamReq, stuff->paramLen);
strncpy(param, (char*)&stuff[1], stuff->paramLen);
param[stuff->paramLen] = '\0';
- xVncExtSetParamReply rep;
rep.type = X_Reply;
rep.length = 0;
rep.success = 0;
char* param;
char* value;
size_t len;
+ xVncExtGetParamReply rep;
REQUEST(xVncExtGetParamReq);
REQUEST_FIXED_SIZE(xVncExtGetParamReq, stuff->paramLen);
free(param);
- xVncExtGetParamReply rep;
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;
rep.success = 0;
char* param;
const char* desc;
size_t len;
+ xVncExtGetParamDescReply rep;
REQUEST(xVncExtGetParamDescReq);
REQUEST_FIXED_SIZE(xVncExtGetParamDescReq, stuff->paramLen);
free(param);
- xVncExtGetParamDescReply rep;
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;
rep.success = 0;
static int ProcVncExtListParams(ClientPtr client)
{
+ xVncExtListParamsReply rep;
+ char *params;
+ size_t len;
+
REQUEST(xVncExtListParamsReq);
REQUEST_SIZE_MATCH(xVncExtListParamsReq);
- xVncExtListParamsReply rep;
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;
- char *params;
- size_t len;
-
params = vncGetParamList();
if (params == NULL)
return BadAlloc;
static int ProcVncExtGetClientCutText(ClientPtr client)
{
+ xVncExtGetClientCutTextReply rep;
+
REQUEST(xVncExtGetClientCutTextReq);
REQUEST_SIZE_MATCH(xVncExtGetClientCutTextReq);
- xVncExtGetClientCutTextReply rep;
rep.type = X_Reply;
rep.length = (clientCutTextLen + 3) >> 2;
rep.sequenceNumber = client->sequence;
static int ProcVncExtConnect(ClientPtr client)
{
char *address;
+ xVncExtConnectReply rep;
REQUEST(xVncExtConnectReq);
REQUEST_FIXED_SIZE(xVncExtConnectReq, stuff->strLen);
strncpy(address, (char*)&stuff[1], stuff->strLen);
address[stuff->strLen] = 0;
- xVncExtConnectReply rep;
rep.success = 0;
if (vncConnectClient(address) == 0)
rep.success = 1;
static int ProcVncExtGetQueryConnect(ClientPtr client)
{
- REQUEST(xVncExtGetQueryConnectReq);
- REQUEST_SIZE_MATCH(xVncExtGetQueryConnectReq);
-
uint32_t opaqueId;
const char *qcAddress, *qcUsername;
int qcTimeout;
+ xVncExtGetQueryConnectReply rep;
+
+ REQUEST(xVncExtGetQueryConnectReq);
+ REQUEST_SIZE_MATCH(xVncExtGetQueryConnectReq);
+
vncGetQueryConnect(&opaqueId, &qcAddress, &qcUsername, &qcTimeout);
- xVncExtGetQueryConnectReply rep;
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;
rep.timeout = qcTimeout;
RRModePtr mode;
char name[100];
+ RRModePtr *modes;
+ int i, num_modes;
+
/* First we create the CRTC... */
crtc = RRCrtcCreate(pScreen, NULL);
vncRandRCrtcSet(pScreen, crtc, NULL, 0, 0, RR_Rotate_0, 1, &output);
/* Populate a list of default modes */
- RRModePtr modes[sizeof(vncRandRWidths)/sizeof(*vncRandRWidths)];
- int num_modes;
+ modes = malloc(sizeof(RRModePtr)*sizeof(vncRandRWidths)/sizeof(*vncRandRWidths));
+ if (modes == NULL)
+ return NULL;
num_modes = 0;
- for (int i = 0;i < sizeof(vncRandRWidths)/sizeof(*vncRandRWidths);i++) {
+ for (i = 0;i < sizeof(vncRandRWidths)/sizeof(*vncRandRWidths);i++) {
mode = vncRandRModeGet(vncRandRWidths[i], vncRandRHeights[i]);
if (mode != NULL) {
modes[num_modes] = mode;
RROutputSetModes(output, modes, num_modes, 0);
+ free(modes);
+
return crtc;
}
int ret;
void *pbits;
+#ifdef RANDR
+ rrScrPrivPtr rp;
+#endif
+
#if XORG >= 113
if (!dixRegisterPrivateKey(&cmapScrPrivateKeyRec, PRIVATE_SCREEN, 0))
return FALSE;
pScreen->CloseScreen = vfbCloseScreen;
#ifdef RANDR
- rrScrPrivPtr rp;
-
ret = RRScreenInit(pScreen);
if (!ret) return FALSE;