aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/randr
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/randr')
-rw-r--r--xorg-server/randr/randr.c5
-rw-r--r--xorg-server/randr/randrstr.h18
-rw-r--r--xorg-server/randr/rrcrtc.c11
-rw-r--r--xorg-server/randr/rrmode.c14
-rw-r--r--xorg-server/randr/rroutput.c11
5 files changed, 56 insertions, 3 deletions
diff --git a/xorg-server/randr/randr.c b/xorg-server/randr/randr.c
index e816461d8..aa1e71dcf 100644
--- a/xorg-server/randr/randr.c
+++ b/xorg-server/randr/randr.c
@@ -354,6 +354,11 @@ RRExtensionInit (void)
SRRScreenChangeNotifyEvent;
EventSwapVector[RREventBase + RRNotify] = (EventSwapPtr)
SRRNotifyEvent;
+
+ RRModeInitErrorValue();
+ RRCrtcInitErrorValue();
+ RROutputInitErrorValue();
+
#ifdef PANORAMIX
RRXineramaExtensionInit();
#endif
diff --git a/xorg-server/randr/randrstr.h b/xorg-server/randr/randrstr.h
index 45c2a5043..2ad53c6dd 100644
--- a/xorg-server/randr/randrstr.h
+++ b/xorg-server/randr/randrstr.h
@@ -701,6 +701,12 @@ extern _X_EXPORT Bool
RRCrtcInit (void);
/*
+ * Initialize crtc type error value
+ */
+extern _X_EXPORT void
+RRCrtcInitErrorValue (void);
+
+/*
* Crtc dispatch
*/
@@ -762,6 +768,12 @@ RRModesForScreen (ScreenPtr pScreen, int *num_ret);
*/
extern _X_EXPORT Bool
RRModeInit (void);
+
+/*
+ * Initialize mode type error value
+ */
+extern _X_EXPORT void
+RRModeInitErrorValue (void);
extern _X_EXPORT int
ProcRRCreateMode (ClientPtr client);
@@ -856,6 +868,12 @@ ProcRRGetOutputPrimary (ClientPtr client);
*/
extern _X_EXPORT Bool
RROutputInit (void);
+
+/*
+ * Initialize output type error value
+ */
+extern _X_EXPORT void
+RROutputInitErrorValue (void);
/* rrpointer.c */
extern _X_EXPORT void
diff --git a/xorg-server/randr/rrcrtc.c b/xorg-server/randr/rrcrtc.c
index a23c824c3..4194cb6c2 100644
--- a/xorg-server/randr/rrcrtc.c
+++ b/xorg-server/randr/rrcrtc.c
@@ -631,10 +631,19 @@ RRCrtcInit (void)
RRCrtcType = CreateNewResourceType (RRCrtcDestroyResource, "CRTC");
if (!RRCrtcType)
return FALSE;
- SetResourceTypeErrorValue(RRCrtcType, RRErrorBase + BadRRCrtc);
+
return TRUE;
}
+/*
+ * Initialize crtc type error value
+ */
+void
+RRCrtcInitErrorValue(void)
+{
+ SetResourceTypeErrorValue(RRCrtcType, RRErrorBase + BadRRCrtc);
+}
+
int
ProcRRGetCrtcInfo (ClientPtr client)
{
diff --git a/xorg-server/randr/rrmode.c b/xorg-server/randr/rrmode.c
index a28d9ca6c..692f61567 100644
--- a/xorg-server/randr/rrmode.c
+++ b/xorg-server/randr/rrmode.c
@@ -260,6 +260,9 @@ RRModeDestroyResource (pointer value, XID pid)
return 1;
}
+/*
+ * Initialize mode type
+ */
Bool
RRModeInit (void)
{
@@ -268,10 +271,19 @@ RRModeInit (void)
RRModeType = CreateNewResourceType (RRModeDestroyResource, "MODE");
if (!RRModeType)
return FALSE;
- SetResourceTypeErrorValue(RRModeType, RRErrorBase + BadRRMode);
+
return TRUE;
}
+/*
+ * Initialize mode type error value
+ */
+void
+RRModeInitErrorValue(void)
+{
+ SetResourceTypeErrorValue(RRModeType, RRErrorBase + BadRRMode);
+}
+
int
ProcRRCreateMode (ClientPtr client)
{
diff --git a/xorg-server/randr/rroutput.c b/xorg-server/randr/rroutput.c
index 757f6f23c..41d282f66 100644
--- a/xorg-server/randr/rroutput.c
+++ b/xorg-server/randr/rroutput.c
@@ -423,10 +423,19 @@ RROutputInit (void)
RROutputType = CreateNewResourceType (RROutputDestroyResource, "OUTPUT");
if (!RROutputType)
return FALSE;
- SetResourceTypeErrorValue(RROutputType, RRErrorBase + BadRROutput);
+
return TRUE;
}
+/*
+ * Initialize output type error value
+ */
+void
+RROutputInitErrorValue(void)
+{
+ SetResourceTypeErrorValue(RROutputType, RRErrorBase + BadRROutput);
+}
+
#define OutputInfoExtra (SIZEOF(xRRGetOutputInfoReply) - 32)
int