displaying an image on a window

Philip Rushik prushik at gmail.com
Thu Oct 16 00:25:29 PDT 2014


Hi
I am currently writing a small test program to communicate with the X
server without using either xlib or xcb. The reason for this is that
it is part of my ongoing experiment in programming without a libc
standard C library, which both libraries require. I do see that the
more code I write, the more it naturally begins to look like XCB.
So far I have been successful in opening a connection to the server,
completing the X11 handshake, creating a GC, creating a window, and
mapping the window to the screen.
However, I can not seem to convince the X server to display an image.
The method I am attempting to use is to create a GC, create a window,
map the window, and then use the put_image request with the drawable
set to the ID of the created window.
The network traffic looks good to me on wireshark, but no image
displays on the window.

Does put image work with a window ID as a drawable? From what I
understand of the X protocol, I believe it should, is that correct?
If not, what steps need to be taken in order to display an image on a
window in the simplest possible manner?

Thanks!
--Philip


More information about the xorg-devel mailing list