tech-x11 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: X server bug?
--------
Mouse <mouse%Rodents-Montreal.ORG@localhost> wrote:
> I might as well mention it now; it's been sleeper-public for a year or
> two and it'll go a bit more public in a couple of months anyway.
> I've been building an X interface library - something that sits in the
> same place in the software stack as Xlib or xcb - based heavily around
> callbacks. One of the things it does is to eliminate the way Xlib uses
> protocol values for all the API defines. To quote a comment:
So you want type checking between things that devolve into an int, so are
indistinguishable. Linux kernel has this problem too.
*rust* :-)
I think it's: https://www.kernel.org/doc/html/v6.1/dev-tools/sparse.html
That they use.
> * We can pick values which are known to be disjoint from X IDs because
> * X IDs never have any of the 0xe0000000 bits set.
> 0x2000001a is LX_PIXMAP_None, which is the API value representing None
> as a pixmap (as opposed to None as a window or None as a graphics
> context or etc). I obviously neglected to add code to map
> LX_PIXMAP_None in the clip-mask setting to 0 on the wire (the protocol
> spec says that None there is represented as 0), but the returned error
> confused me because it was saying 0 was invalid, which it isn't; 0 is a
> valid value for that field in the wire protocol. It wasn't until I
> snooped the wire protocol and saw it putting 2000001a on the wire that
> I realized what I'd done wrong, then saw the 0 coming back in the error
> event and realized what the server was doing wrong.
Oh, I see!
>> I had to add #include <stdlib.h>,
> Hm, yeah, I should write return(0) instead of exit(0) at the end.
>> and I had to build with -lX11:
> Well, sure; it's an X program. (Admittedly, I probably should have
> remarked on the need for -lX11.)
It was an obvious duh, but often more than -lX11 is needed, and I am glad I
didn't have to guess further.
--
] Never tell me the odds! | ipv6 mesh networks [
] Michael Richardson, Sandelman Software Works | IoT architect [
] mcr%sandelman.ca@localhost http://www.sandelman.ca/ | ruby on rails [
Home |
Main Index |
Thread Index |
Old Index