I am trying to create a layout window manager. While this works, but when the window overlays another, it flickers like crazy. I found that it was because I was creating a Picture and then drawing on it, which made it draw on the screen.
My desired behavior was to have an off-screen Picture that I can draw on, and then use XComposite to draw it on the screen window. Is there a way to have an off-screen Picture that is the same size as the root window?
So far (this code runs in an endless thingy loop):
Window root, parent, *children; uint children_count; XQueryTree(disp, DefaultRootWindow(disp), &root, &parent, &children, &children_count);
source share