internal void FlushQueue () {
CheckTimers (DateTime.UtcNow);
lock (queuelock) {
while (MessageQueue.Count > 0) {
object queueobj = MessageQueue.Dequeue ();
if (queueobj is GCHandle) {
XplatUIDriverSupport.ExecuteClientMessage((GCHandle)queueobj);
} else {
MSG msg = (MSG)queueobj;
NativeWindow.WndProc (msg.hwnd, msg.message, msg.wParam, msg.lParam);
}
}
}
}