rem: while (!panel->done) { XEvent event;  WMNextEvent(dpy, &event); WMHandleEvent(&event); }
add: WMRunModalLoop(WMWidgetScreen(panel->win), WMWidgetView(panel->win));
context: wMessageDialog(WScreen *scr, char *title, char *message, 	       char *defBtn, char *altBtn, char *othBtn){    WMAlertPanel *panel;    Window parent;    WWindow *wwin;    int result;    panel = WMCreateAlertPanel(scr->wmscreen, NULL, title, message,			       defBtn, altBtn, othBtn);        parent = XCreateSimpleWindow(dpy, scr->root_win, 0, 0, 400, 180, 0, 0, 0);        XReparentWindow(dpy, WMWidgetXID(panel->win), parent, 0, 0);    wwin = wManageInternalWindow(scr, parent, None, NULL, 				 (scr->scr_width - 400)/2,				 (scr->scr_height - 180)/2, 400, 180);    wwin->client_leader = WMWidgetXID(panel->win);    WMMapWidget(panel->win);        wWindowMap(wwin);    while (!panel->done) {	XEvent event;		WMNextEvent(dpy, &event);	WMHandleEvent(&event);    }    result = panel->result;    WMUnmapWidget(panel->win);    wUnmanageWindow(wwin, False, False);    WMDestroyAlertPanel(panel);    XDestroyWindow(dpy, parent);    return result;}