aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Extensions.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-06-20 11:10:06 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-06-21 04:09:17 +0200
commitc2b1f489d7998c83af73c7cb25bbb2bc53f26094 (patch)
treef6f5ff5fe899c840ffe6623244070699c10a95fe /nx-X11/programs/Xserver/hw/nxagent/Extensions.c
parent2e5b98986ffe9de86d7329304ead298c164340bf (diff)
downloadnx-libs-c2b1f489d7998c83af73c7cb25bbb2bc53f26094.tar.gz
nx-libs-c2b1f489d7998c83af73c7cb25bbb2bc53f26094.tar.bz2
nx-libs-c2b1f489d7998c83af73c7cb25bbb2bc53f26094.zip
Backport RANDR proto version 1.5 to nx-X11's Xserver.
Backported to X.org's /xorg/xserver Git hash level: a6b6e8ba026acedef6336b17adf06aebddd5f22f.
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Extensions.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Extensions.c114
1 files changed, 110 insertions, 4 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c
index dfa511448..494027927 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c
@@ -35,6 +35,32 @@ static int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width,
static int nxagentRandRInitSizes(ScreenPtr pScreen);
+#if RANDR_14_INTERFACE
+static Bool
+nxagentRandRReplaceScanoutPixmap(DrawablePtr pDrawable,
+ PixmapPtr pPixmap,
+ Bool enable);
+#endif
+
+#if RANDR_13_INTERFACE
+static Bool
+nxagentRandROutputGetProperty(ScreenPtr pScreen,
+ RROutputPtr output,
+ Atom property);
+static Bool
+nxagentRandRGetPanning(ScreenPtr pScrn,
+ RRCrtcPtr crtc,
+ BoxPtr totalArea,
+ BoxPtr trackingArea,
+ INT16 *border);
+static Bool
+nxagentRandRSetPanning(ScreenPtr pScrn,
+ RRCrtcPtr crtc,
+ BoxPtr totalArea,
+ BoxPtr trackingArea,
+ INT16 *border);
+#endif
+
#if RANDR_12_INTERFACE
static Bool nxagentRandRCrtcSet (ScreenPtr pScreen, RRCrtcPtr crtc,
RRModePtr mode, int x, int y,
@@ -104,6 +130,29 @@ void nxagentInitRandRExtension(ScreenPtr pScreen)
pRandRScrPriv -> rrGetInfo = nxagentRandRGetInfo;
+ #if RANDR_15_INTERFACE
+ /* nothing to be assigned here, so far */
+ #endif
+
+ #if RANDR_14_INTERFACE
+ /* no pixmap sharing in nx-X11 */
+ pScreen->ReplaceScanoutPixmap = nxagentRandRReplaceScanoutPixmap;
+ pRandRScrPriv -> rrCrtcSetScanoutPixmap = NULL;
+
+ /* only fake provider support in nx-X11, so far */
+ pRandRScrPriv -> provider = RRProviderCreate(pScreen, "default", 7);
+ pRandRScrPriv -> rrProviderSetOutputSource = NULL;
+ pRandRScrPriv -> rrProviderSetOffloadSink;
+ pRandRScrPriv -> rrProviderGetProperty;
+ pRandRScrPriv -> rrProviderSetProperty;
+ #endif
+
+ #if RANDR_13_INTERFACE
+ pRandRScrPriv -> rrOutputGetProperty = nxagentRandROutputGetProperty;
+ pRandRScrPriv -> rrGetPanning = nxagentRandRGetPanning;
+ pRandRScrPriv -> rrSetPanning = nxagentRandRSetPanning;
+ #endif
+
#if RANDR_12_INTERFACE
pRandRScrPriv -> rrScreenSetSize = nxagentRandRScreenSetSize;
pRandRScrPriv -> rrCrtcSet = nxagentRandRCrtcSet;
@@ -114,13 +163,70 @@ void nxagentInitRandRExtension(ScreenPtr pScreen)
#endif
}
-void
-RRResetProc (ExtensionEntry *extEntry)
+#if RANDR_14_INTERFACE
+static Bool
+nxagentRandRReplaceScanoutPixmap(DrawablePtr pDrawable,
+ PixmapPtr pPixmap,
+ Bool enable)
+{
+ /* FALSE means: not supported */
+#ifdef DEBUG
+ fprintf(stderr, "nxagentRandRReplaceScanoutPixmap: NX's RANDR does not support scan-out pixmaps.\n");
+#endif
+ return FALSE;
+}
+#endif
+
+#if RANDR_13_INTERFACE
+static Bool
+nxagentRandROutputGetProperty(ScreenPtr pScreen,
+ RROutputPtr output,
+ Atom property)
{
- fprintf(stderr, "RANDR going down - NX version\n");
+ /* FALSE means: no property required to be modified on the fly here */
+ return FALSE;
}
+static Bool
+nxagentRandRGetPanning(ScreenPtr pScrn,
+ RRCrtcPtr crtc,
+ BoxPtr totalArea,
+ BoxPtr trackingArea,
+ INT16 *border)
+{
+ /* FALSE means: no, panning is not supported at the moment...
+ * Panning requires several modes to be available for
+ * the NX<n> output(s).
+ *
+ * FIXME: Add more modes per output than the current window size.
+ * At least when in fullscreen mode.
+ */
+#ifdef DEBUG
+ fprintf(stderr, "nxagentRandRGetPanning: RANDR Panning is currently not supported.\n");
+#endif
+ return FALSE;
+}
+static Bool
+nxagentRandRSetPanning(ScreenPtr pScrn,
+ RRCrtcPtr crtc,
+ BoxPtr totalArea,
+ BoxPtr trackingArea,
+ INT16 *border)
+{
+ /* FALSE means: no, panning is not supported at the moment...
+ * Panning requires several modes to be available for
+ * the NX<n> output(s).
+ *
+ * FIXME: Add more modes per output than the current window size.
+ * At least when in fullscreen mode.
+ */
+#ifdef DEBUG
+ fprintf(stderr, "nxagentRandRSetPanning: RANDR Panning is currently not supported.\n");
+#endif
+ return FALSE;
+}
+#endif
#if RANDR_12_INTERFACE
/*
@@ -137,7 +243,7 @@ nxagentRandRCrtcSet (ScreenPtr pScreen,
int numOutputs,
RROutputPtr *outputs)
{
- return RRCrtcNotify(crtc, mode, x, y, rotation, numOutputs, outputs);
+ return RRCrtcNotify(crtc, mode, x, y, rotation, NULL, numOutputs, outputs);
}
#endif