Equivalent of “Invalidate Rect” / “WM_PAINT” in X11
问题 I'm Porting some code from Windows to XLib. In the windows code, I can force a redraw by calling InvalidateRect and then handling the corresponding WM_PAINT message. However, I am having trouble finding out how to do this in X11/XLib. I see there is an Expose message but not sure if that is the same thing. If it matters, I need to do this to force the window to render at a certain frame rate for an OpenGL based program. 回答1: You need to handle Expose events. This tutorial explains with an