xserver: Branch 'randr-1.2-for-server-1.2'

Keith Packard keithp at kemper.freedesktop.org
Mon Nov 27 05:32:32 EET 2006


 randr/rrcrtc.c   |    2 ++
 randr/rrmode.c   |    3 +++
 randr/rroutput.c |    2 ++
 3 files changed, 7 insertions(+)

New commits:
diff-tree ec83d674167e7045d5317b179c9998e3172a26dc (from 0626eb8e5c9fa05de6bdc9aa0c654f5148bf7cff)
Author: Keith Packard <keithp at neko.keithp.com>
Date:   Sun Nov 26 19:31:48 2006 -0800

    Ensure RandR resource types are registered before resources are created.
    
    Now that resources can be created during server initialization, make sure
    the crtc, output and mode resource types are created before attempting to
    create associated resources.

diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index b81c390..212352c 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -55,6 +55,8 @@ RRCrtcCreate (void	*devPrivate)
 {
     RRCrtcPtr	crtc;
     
+    if (!RRInit())
+	return NULL;
     crtc = xalloc (sizeof (RRCrtcRec));
     if (!crtc)
 	return NULL;
diff --git a/randr/rrmode.c b/randr/rrmode.c
index 3cd9ef2..a0696e1 100644
--- a/randr/rrmode.c
+++ b/randr/rrmode.c
@@ -67,6 +67,9 @@ RRModeGet (xRRModeInfo	*modeInfo,
 	}
     }
 
+    if (!RRInit ())
+	return NULL;
+
     mode = xalloc (sizeof (RRModeRec) + modeInfo->nameLength + 1);
     if (!mode)
 	return NULL;
diff --git a/randr/rroutput.c b/randr/rroutput.c
index 8b760ec..f38f582 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -51,6 +51,8 @@ RROutputCreate (const char  *name,
 {
     RROutputPtr	output;
 
+    if (!RRInit())
+	return NULL;
     output = xalloc (sizeof (RROutputRec) + nameLength + 1);
     if (!output)
 	return NULL;



More information about the xorg-commit mailing list