Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!rpi!zaphod.mps.ohio-state.edu!samsung!uunet!pcrat!rick From: rick@pcrat.uucp (Rick Richardson) Newsgroups: comp.windows.x Subject: Running Event Processing from a callback Message-ID: <1990Aug9.162333.6049@pcrat.uucp> Date: 9 Aug 90 16:23:33 GMT Organization: PC Research, Inc. Lines: 36 This group is so full of useful information, I can't help but ask another question: Is it safe to run a pseudo-XtAppMainLoop() from a callback that was itself triggered by a XtAppMainLoop()? If safe, are there any potentially ugly side-effects? People may wonder why I want to do this. In the context of the entire application, there may be stylistic reasons to want this. I'm not 100% sure how I may end up proceeding, and I just need to know my valid options. E.G.: main() { - create command button with callback to button_pressed() - XtAppMainLoop(Context); } button_pressed() { XtPopup(PopupShell); StayInPopup = 1; /* When done, popup will set to 0 */ while (StayInPopup) { XEvent event; XtAppNextEvent(Context, &event); XtDispatchEvent(&event); } XtPopdown(PopupShell); } -- Rick Richardson - PC Research, Inc., uunet!pcrat!rick, (201) 389-8963