I have a xlib window manager and I create Windows using XCreateSimpleWindow. The function allowed selecting an initial window background color. I want to change this color at runtime. I found this is possible with XSetWindowBackground. However, to see the changes, I need to unmap and map the window. In my program I will not be able to constantly do this. Additionally, this does not seem like great programming either.
Is there a better way to change the window background color?