[PATCH] XOpenDisplay: save the correct display_name value

Aaron Plattner aplattner at nvidia.com
Tue Aug 17 11:44:09 PDT 2010


On Tue, Aug 17, 2010 at 11:27:25AM -0700, jamey at minilop.net wrote:
> On Mon, Aug 16, 2010 at 9:34 AM, Aaron Plattner <aplattner at nvidia.com> wrote:
> > The X Test Suite's XDisplayString test checks the invariant
> > XDisplayString(XOpenDisplay(str)) == str.  The XCB-based XOpenDisplay violates
> > this invariant by expanding str to the canonical form "host:display.scrn"
> > (unless HAVE_LAUNCHD is set and it starts with "/tmp/launch").  E.g., this
> > expands ":1" to ":1.0":
> 
> I don't understand. As far as I can tell, the non-XCB variant set
> dpy->display_name exactly the same way: See the uses of fullnamep in
> ConnDis.c:_X11TransConnectDisplay. I certainly didn't write extra code
> for re-formatting a display string just for fun. :-)

Sorry, you're right that this does predate XCB.

> I'm not opposed to this patch, since I'm always in favor of deleting
> code--but since this seems to have been Xlib's behavior ever since the
> import into git, I'm not sure it's a good idea.

I agree, this seems like old behavior and therefore fixing it is risky.  If
anyone wants to put the kabosh on this change, I can add an exception to
the test or something, but if nobody chimes up then I'd like to go ahead
with it since the man page is pretty clear.

> At the least, I'd appreciate the commit message reflecting that the
> bug has nothing to do with XCB. :-)

Yeah, I'll fix that.


More information about the xorg-devel mailing list