nomad-software/x11 — pull request #2 by Geod24 (2014-04-15 03:02:51+00:00)
Title: Fix definitions in Xproto

There is a problem with the translation of the Xproto header.
Some #define, which are translated to aliases, are later #undef.
However, there is no way to unalias, or hide them (Compiler will tell you it's private instead of undefined).

The way to fix it is to put the aliases in another module, and import that module. With this setup, aliases will be effectively hidden on the second level of import.

This code exhibit the problem:
````
import x11.Xlib;
import x11.X;
import x11.Xproto;

void main()
{
Display* dpy = XOpenDisplay(null);
assert(dpy !is null);
char[256] cBuff = 0;
Atom state[256];
cBuff[0..24] = "_NET_WM_STATE_FULLSCREEN";
state[0] = XInternAtom(dpy, cBuff.ptr, 0);
}
````

Error:
````
source/app.d(10): Error: x11.X.Atom at ../.dub/packages/x11-master/source/x11/X.d(11) conflicts with x11.Xproto.Atom at ../.dub/packages/x11-master/source/x11/Xproto.d(181)
source/app.d(10): Error: x11.X.Atom at ../.dub/packages/x11-master/source/x11/X.d(11) conflicts with x11.Xproto.Atom at ../.dub/packages/x11-master/source/x11/Xproto.d(181)
````

Commenting 'import x11.X' is even more problematic:
source/app.d(12): Error: cannot implicitly convert expression (XInternAtom(dpy, & cBuff, 0)) of type ulong to uint

In the process, I added a .gitignore (useful when you use git submodules).