simple ChangeGC cleanups

Jamey Sharp jamey at minilop.net
Fri May 7 20:23:55 PDT 2010


On Thu, May 6, 2010 at 2:45 PM, Keith Packard <keithp at keithp.com> wrote:
> On Thu,  6 May 2010 13:12:03 -0700, Jamey Sharp <jamey at minilop.net> wrote:
>> -/* Various of the DIX function interfaces were not designed to allow
>> - * the client->errorValue to be set on BadValue and other errors.
>> - * Rather than changing interfaces and breaking untold code we introduce
>> - * a new global that dispatch can use.
>> - */
>> -extern XID clientErrorValue;   /* XXX this is a kludge */
>
> If you look in DIX, this is only used by the colormap code and the gc
> code, and the gc code even has the appropriate client pointer already.

I'm not entirely convinced. Only one call that hits dixChangeGC passes a
real client pointer. One other passes serverClient, and all the rest
pass NullClient. I'm skeptical that all those cases using NullClient
don't need to pass an error value back to the client.

I produced the following series of cleanup patches while trying to
understand what's going on in the GC code. I'd appreciate review...

> I'd say we should just nuke the variable and fix the colormap
> functions.

I can't argue with that, but it looks like more work than I feel like
doing today. :-) Would you consider taking the patch I originally
posted, as it's an improvement over leaving random unused extern
declarations scattered around?

Jamey


More information about the xorg-devel mailing list