diff options
author | Tobias Droste <tdroste@gmx.de> | 2010-09-29 22:51:48 +0200 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-09-29 14:41:53 -0700 |
commit | c7e4222c9a27094ce4fc2831ac92acbb7b21fb1a (patch) | |
tree | ac0596aaff9921f3567e47f6df1d0832031b55ba /randr/rrcrtc.c | |
parent | 72a9c686d7ecaa68d27687b316dbba92902809b4 (diff) |
randr: set error numbers of resource types in RRExtenstionInit() (V2)
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=30367
Currently the ddx calls xf86RandR12Init()
(-> RRScreenInit()
-> RRInit()
-> RRModeInit()
-> RRCrtcInit()
-> RROutputInit())
before RRExtensionInit() is called. This causes RRErrorBase
being 0 while setting resource type error values (resource types:
RROutput, RRMode and RRCrtc). The fix moves the setting of error
values to own functions which are called in RRExtensionInit()
to get the right RRErrorBase.
V2: With header file
Signed-off-by: Tobias Droste <tdroste@gmx.de>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'randr/rrcrtc.c')
-rw-r--r-- | randr/rrcrtc.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index 14f6e45ac..98206a2b9 100644 --- a/randr/rrcrtc.c +++ b/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) { |