LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   X11 protocol handshake questions (https://www.linuxquestions.org/questions/linux-networking-3/x11-protocol-handshake-questions-4175521740/)

prushik 10-10-2014 09:25 PM

X11 protocol handshake questions
 
Hi everybody

I am working on a little application as part of my ongoing experiment of accomplishing as much as possible without touching the C Standard Library. So far I have been doing quite well, I have been able to display graphics in the Linux framebuffer and even get DRM working. But now, I want to get into using X11.
And with this, I have actually been successful. I have a program that opens a socket (unix domain or TCP) and communicates with the X server directly. However, so far I have only tested in controlled environments, and I know I am not handling some parts of the X protocol as well as I should be. So I have a couple questions that might better be answered by somebody who already has a more intimate knowledge of the X protocol than I do.

When connecting to the X server, there is a handshake between the client and server. In the server's response, there is a lot of information. There is a header, a setup section, a vendor string, pixmap formats, root windows, depth info sections, and visual IDs. So far, I can interpret everything up to the root windows with no problems or questions. However, it seems to be possible in the X protocol for there to be MORE THAN ONE root window?

1.
Is that true? (can there be more than one root window?)
If so, when would that ever happen?

The root window section(s) specify the number of available depths, which are the next section of the packet.

2.
If there is more than one root, will all the depth appear after all the roots have been listed, or will the depths of each root be listed directly after that particular root section?

3.
Likewise, each depth contains a count of the visual IDs which will follow the depth section. If there is more than one depth, will each depth be followed by the visual IDs for that depth, or will all the visual IDs be listed after all the depths have been listed?

Thanks everybody!


All times are GMT -5. The time now is 05:11 AM.