/* 
 * Motif Tools Library, Version 2.0
 * $Id: Block.c,v 2.9 1994/07/04 03:03:50 david Exp $
 * 
 * Written by David Flanagan.
 * Copyright (c) 1992, 1993, 1994 by Dovetail Systems.
 * All Rights Reserved.  See the file COPYRIGHT for details.
 * This is not free software.  See the file SHAREWARE for details.
 * There is no warranty for this software.  See NO_WARRANTY for details.
 */

#include <Xmt/Xmt.h>

#if NeedFunctionPrototypes
void XmtBlock(Widget w, Boolean *block)
#else
void XmtBlock(w, block)
Widget w;
Boolean *block;
#endif
{
    XtAppContext app = XtWidgetToApplicationContext(w);
    
    while (*block) {
	XtAppProcessEvent(app, XtIMAll);
	/* argv puts an XSync here.  Why? */
    }

    XSync(XtDisplayOfObject(w), 0);
    XmUpdateDisplay(w);
}
