From: José Fonseca Date: Fri, 20 Jan 2012 15:39:15 +0000 (+0000) Subject: Drain Windows message queue. X-Git-Tag: 2.0_alpha^2~345 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b67424b868bf9c0a81aa306ea2ed2e735dc6dfb1;p=tools%2Fapitrace.git Drain Windows message queue. To prevent window from being considered non-responsive. --- diff --git a/glws_wgl.cpp b/glws_wgl.cpp index ca100d9..59f4786 100644 --- a/glws_wgl.cpp +++ b/glws_wgl.cpp @@ -162,6 +162,14 @@ public: void swapBuffers(void) { SwapBuffers(hDC); + + // Drain message queue to prevent window from being considered + // non-responsive + MSG msg; + while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { + TranslateMessage(&msg); + DispatchMessage(&msg); + } } };