Xlibを使ったプログラムを作っています。
ウインドウが他のウインドウで隠されても描画したものを保持したいんですが、
XSetWindowAttributes window_attr;

window_attr.backing_store = Always;
window_attr.save_under = True;
XChangeWindowAttributes(display, window, CWBackingStore|CWSaveUnder, &window_attr);
としても、消えてしまいます。
どうしたら描画内容を保持できるのでしょうか。