aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Åstrand (astrand) <astrand@cendio.se>2018-03-07 12:54:44 +0100
committerPeter Åstrand (astrand) <astrand@cendio.se>2018-04-09 10:26:25 +0200
commitab98f7657b715a991023fc5e98ba2c58103d40d6 (patch)
treefca19546bd34bbdd645b75fef66f9dbb06920fb5
parent94ab2db366b2607391358d472dfb6f8f5eab9644 (diff)
downloadtigervnc-ab98f7657b715a991023fc5e98ba2c58103d40d6.tar.gz
tigervnc-ab98f7657b715a991023fc5e98ba2c58103d40d6.zip
Removed support for building without RANDR define
RANDR is mandatory since Xorg 1.7, which is the oldest version we support.
-rw-r--r--unix/xserver/hw/vnc/RandrGlue.c42
-rw-r--r--unix/xserver/hw/vnc/XserverDesktop.h2
-rw-r--r--unix/xserver/hw/vnc/vncHooks.c18
-rw-r--r--unix/xserver/hw/vnc/vncModule.c5
-rw-r--r--unix/xserver/hw/vnc/xvnc.c8
5 files changed, 1 insertions, 74 deletions
diff --git a/unix/xserver/hw/vnc/RandrGlue.c b/unix/xserver/hw/vnc/RandrGlue.c
index 81065710..54a035d5 100644
--- a/unix/xserver/hw/vnc/RandrGlue.c
+++ b/unix/xserver/hw/vnc/RandrGlue.c
@@ -25,9 +25,7 @@
#include <string.h>
#include "scrnintstr.h"
-#ifdef RANDR
#include "randrstr.h"
-#endif
#include "RandrGlue.h"
@@ -43,50 +41,37 @@ int vncGetScreenHeight(int scrIdx)
int vncRandRResizeScreen(int scrIdx, int width, int height)
{
-#ifdef RANDR
ScreenPtr pScreen = screenInfo.screens[scrIdx];
/* Try to retain DPI when we resize */
return RRScreenSizeSet(pScreen, width, height,
pScreen->mmWidth * width / pScreen->width,
pScreen->mmHeight * height / pScreen->height);
-#else
- return 0;
-#endif
}
void vncRandRUpdateSetTime(int scrIdx)
{
-#ifdef RANDR
rrScrPrivPtr rp = rrGetScrPriv(screenInfo.screens[scrIdx]);
rp->lastSetTime = currentTime;
-#endif
}
int vncRandRHasOutputClones(int scrIdx)
{
-#ifdef RANDR
rrScrPrivPtr rp = rrGetScrPriv(screenInfo.screens[scrIdx]);
for (int i = 0;i < rp->numCrtcs;i++) {
if (rp->crtcs[i]->numOutputs > 1)
return 1;
}
-#endif
return 0;
}
int vncRandRGetOutputCount(int scrIdx)
{
-#ifdef RANDR
rrScrPrivPtr rp = rrGetScrPriv(screenInfo.screens[scrIdx]);
return rp->numOutputs;
-#else
- return 0;
-#endif
}
int vncRandRGetAvailableOutputs(int scrIdx)
{
-#ifdef RANDR
rrScrPrivPtr rp = rrGetScrPriv(screenInfo.screens[scrIdx]);
int availableOutputs;
@@ -138,24 +123,16 @@ int vncRandRGetAvailableOutputs(int scrIdx)
free(usedCrtcs);
return availableOutputs;
-#else
- return 0;
-#endif
}
char *vncRandRGetOutputName(int scrIdx, int outputIdx)
{
-#ifdef RANDR
rrScrPrivPtr rp = rrGetScrPriv(screenInfo.screens[scrIdx]);
return strdup(rp->outputs[outputIdx]->name);
-#else
- return strdup("");
-#endif
}
int vncRandRIsOutputEnabled(int scrIdx, int outputIdx)
{
-#ifdef RANDR
rrScrPrivPtr rp = rrGetScrPriv(screenInfo.screens[scrIdx]);
if (rp->outputs[outputIdx]->crtc == NULL)
@@ -164,14 +141,10 @@ int vncRandRIsOutputEnabled(int scrIdx, int outputIdx)
return 0;
return 1;
-#else
- return 0;
-#endif
}
int vncRandRIsOutputUsable(int scrIdx, int outputIdx)
{
-#ifdef RANDR
rrScrPrivPtr rp = rrGetScrPriv(screenInfo.screens[scrIdx]);
RROutputPtr output;
@@ -186,14 +159,12 @@ int vncRandRIsOutputUsable(int scrIdx, int outputIdx)
if (output->crtcs[i]->numOutputs == 0)
return 1;
}
-#endif
return 0;
}
int vncRandRDisableOutput(int scrIdx, int outputIdx)
{
-#ifdef RANDR
rrScrPrivPtr rp = rrGetScrPriv(screenInfo.screens[scrIdx]);
RRCrtcPtr crtc;
@@ -202,25 +173,17 @@ int vncRandRDisableOutput(int scrIdx, int outputIdx)
return 1;
return RRCrtcSet(crtc, NULL, crtc->x, crtc->y, crtc->rotation, 0, NULL);
-#else
- return 0;
-#endif
}
unsigned int vncRandRGetOutputId(int scrIdx, int outputIdx)
{
-#ifdef RANDR
rrScrPrivPtr rp = rrGetScrPriv(screenInfo.screens[scrIdx]);
return rp->outputs[outputIdx]->id;
-#else
- return 0;
-#endif
}
void vncRandRGetOutputDimensions(int scrIdx, int outputIdx,
int *x, int *y, int *width, int *height)
{
-#ifdef RANDR
rrScrPrivPtr rp = rrGetScrPriv(screenInfo.screens[scrIdx]);
int swap;
@@ -237,13 +200,11 @@ void vncRandRGetOutputDimensions(int scrIdx, int outputIdx,
*height = swap;
break;
}
-#endif
}
int vncRandRReconfigureOutput(int scrIdx, int outputIdx, int x, int y,
int width, int height)
{
-#ifdef RANDR
rrScrPrivPtr rp = rrGetScrPriv(screenInfo.screens[scrIdx]);
RROutputPtr output;
@@ -277,7 +238,4 @@ int vncRandRReconfigureOutput(int scrIdx, int outputIdx, int x, int y,
/* Reconfigure new mode and position */
return RRCrtcSet(crtc, mode, x, y, crtc->rotation, 1, &output);
-#else
- return 0;
-#endif
}
diff --git a/unix/xserver/hw/vnc/XserverDesktop.h b/unix/xserver/hw/vnc/XserverDesktop.h
index 8866f187..f1c3e3e7 100644
--- a/unix/xserver/hw/vnc/XserverDesktop.h
+++ b/unix/xserver/hw/vnc/XserverDesktop.h
@@ -132,9 +132,7 @@ private:
rfb::CharArray queryConnectUsername;
rfb::Timer queryConnectTimer;
-#ifdef RANDR
OutputIdMap outputIdMap;
-#endif
rfb::Point oldCursorPos;
};
diff --git a/unix/xserver/hw/vnc/vncHooks.c b/unix/xserver/hw/vnc/vncHooks.c
index c0d9f7c6..f3c2520a 100644
--- a/unix/xserver/hw/vnc/vncHooks.c
+++ b/unix/xserver/hw/vnc/vncHooks.c
@@ -38,9 +38,7 @@
#ifdef RENDER
#include "picturestr.h"
#endif
-#ifdef RANDR
#include "randrstr.h"
-#endif
#define DBGPRINT(x) //(fprintf x)
@@ -79,11 +77,9 @@ typedef struct _vncHooksScreenRec {
TriFanProcPtr TriFan;
#endif
#endif
-#ifdef RANDR
RRSetConfigProcPtr rrSetConfig;
RRScreenSetSizeProcPtr rrScreenSetSize;
RRCrtcSetProcPtr rrCrtcSet;
-#endif
} vncHooksScreenRec, *vncHooksScreenPtr;
typedef struct _vncHooksGCRec {
@@ -174,7 +170,6 @@ static void vncHooksTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
int npoint, xPointFixed * points);
#endif
#endif
-#ifdef RANDR
static Bool vncHooksRandRSetConfig(ScreenPtr pScreen, Rotation rotation,
int rate, RRScreenSizePtr pSize);
static Bool vncHooksRandRScreenSetSize(ScreenPtr pScreen,
@@ -184,7 +179,6 @@ static Bool vncHooksRandRCrtcSet(ScreenPtr pScreen, RRCrtcPtr crtc,
RRModePtr mode, int x, int y,
Rotation rotation, int numOutputs,
RROutputPtr *outputs);
-#endif
// GC "funcs"
@@ -277,9 +271,7 @@ int vncHooksInit(int scrIdx)
#ifdef RENDER
PictureScreenPtr ps;
#endif
-#ifdef RANDR
rrScrPrivPtr rp;
-#endif
pScreen = screenInfo.screens[scrIdx];
@@ -339,7 +331,6 @@ int vncHooksInit(int scrIdx)
#endif
}
#endif
-#ifdef RANDR
rp = rrGetScrPriv(pScreen);
if (rp) {
/* Some RandR callbacks are optional */
@@ -350,7 +341,6 @@ int vncHooksInit(int scrIdx)
if (rp->rrCrtcSet)
wrap(vncHooksScreen, rp, rrCrtcSet, vncHooksRandRCrtcSet);
}
-#endif
return TRUE;
}
@@ -473,9 +463,7 @@ static Bool vncHooksCloseScreen(ScreenPtr pScreen_)
#ifdef RENDER
PictureScreenPtr ps;
#endif
-#ifdef RANDR
rrScrPrivPtr rp;
-#endif
SCREEN_PROLOGUE(pScreen_, CloseScreen);
@@ -501,14 +489,12 @@ static Bool vncHooksCloseScreen(ScreenPtr pScreen_)
#endif
}
#endif
-#ifdef RANDR
rp = rrGetScrPriv(pScreen);
if (rp) {
unwrap(vncHooksScreen, rp, rrSetConfig);
unwrap(vncHooksScreen, rp, rrScreenSetSize);
unwrap(vncHooksScreen, rp, rrCrtcSet);
}
-#endif
DBGPRINT((stderr,"vncHooksCloseScreen: unwrapped screen functions\n"));
@@ -1199,8 +1185,6 @@ static void vncHooksTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
#endif /* RENDER */
-#ifdef RANDR
-
// Unwrap and rewrap helpers
#define RANDR_PROLOGUE(field) \
@@ -1275,8 +1259,6 @@ static Bool vncHooksRandRCrtcSet(ScreenPtr pScreen, RRCrtcPtr crtc,
return TRUE;
}
-#endif /* RANDR */
-
/////////////////////////////////////////////////////////////////////////////
//
// GC "funcs"
diff --git a/unix/xserver/hw/vnc/vncModule.c b/unix/xserver/hw/vnc/vncModule.c
index 704e56ee..5d95ef06 100644
--- a/unix/xserver/hw/vnc/vncModule.c
+++ b/unix/xserver/hw/vnc/vncModule.c
@@ -24,9 +24,7 @@
#endif
#include "opaque.h"
-#ifdef RANDR
#include "randrstr.h"
-#endif
#include "xorg-version.h"
#if XORG <= 111
@@ -112,7 +110,6 @@ void vncClientGone(int fd)
{
}
-#ifdef RANDR
int vncRandRCreateOutputs(int scrIdx, int extraOutputs)
{
return 0;
@@ -137,4 +134,4 @@ void *vncRandRCreatePreferredMode(void *out, int width, int height)
return NULL;
}
-#endif
+
diff --git a/unix/xserver/hw/vnc/xvnc.c b/unix/xserver/hw/vnc/xvnc.c
index 4133689b..0f17095d 100644
--- a/unix/xserver/hw/vnc/xvnc.c
+++ b/unix/xserver/hw/vnc/xvnc.c
@@ -73,9 +73,7 @@ from the X Consortium.
#include "os.h"
#include "miline.h"
#include "inputstr.h"
-#ifdef RANDR
#include "randrstr.h"
-#endif /* RANDR */
#ifdef DPMSExtension
#include "dpmsproc.h"
#endif
@@ -953,7 +951,6 @@ static miPointerScreenFuncRec vfbPointerCursorFuncs = {
miPointerWarpCursor
};
-#ifdef RANDR
static Bool vncRandRGetInfo (ScreenPtr pScreen, Rotation *rotations)
{
@@ -1450,7 +1447,6 @@ static Bool vncRandRInit(ScreenPtr pScreen)
return TRUE;
}
-#endif
static Bool
#if XORG < 113
@@ -1507,9 +1503,7 @@ vfbScreenInit(ScreenPtr pScreen, int argc, char **argv)
int ret;
void *pbits;
-#ifdef RANDR
rrScrPrivPtr rp;
-#endif
#if XORG >= 113
if (!dixRegisterPrivateKey(&cmapScrPrivateKeyRec, PRIVATE_SCREEN, 0))
@@ -1645,7 +1639,6 @@ vfbScreenInit(ScreenPtr pScreen, int argc, char **argv)
pvfb->closeScreen = pScreen->CloseScreen;
pScreen->CloseScreen = vfbCloseScreen;
-#ifdef RANDR
ret = RRScreenInit(pScreen);
if (!ret) return FALSE;
@@ -1660,7 +1653,6 @@ vfbScreenInit(ScreenPtr pScreen, int argc, char **argv)
ret = vncRandRInit(pScreen);
if (!ret) return FALSE;
-#endif
return TRUE;