I’m developing my own library for I/O purposes in D, and so far I managed to make my window to open up, but when I close it, I get an error like this:

X connection to :0 broken (explicit kill or server shutdown).

I cannot find anything related to this, and most guides instead recommend me to use some preexisting library for the same purposes, except they often come with very serious caveats (SDL2’s audio didn’t work for me at all, SFML and a lot of other libraries use the older DirectInput library instead of something newer, etc).