Sebastian Lackner sebastian@fds-team.de writes:
This patch implements an additional ExtEscape command X11DRV_FLUSH_GDI_DISPLAY, which can be used by external applications in order to flush all drawing operations to the Xserver.
This patch is necessary for a new feature of Pipelight: In NPAPI windowlessmode the browser provides an X11 drawable, and expects the plugin (= the wine application) to draw on it. The current implementation uses CreateDCA() to create a new hDC and then X11DRV_SET_DRAWABLE to draw on an arbitrary X11 drawable. The additional command implemented in this patch is required to ensure that the drawing is finished before the PAINT event returns. Normally an XSync would be even better, but a lot of testing shows that XFlush is also sufficient (and faster), thats why we decided to use this approach.
You should call MsgWaitForMultipleObjects or some similar function instead of adding private escapes.