raghu@atc1.atc.com (Raghothama Cauligi) (05/23/91)
If I call XNextEvent from a callback function, it hangs the display, i.e., none of the windows on the screen accept any input and I have to kill the program from another terminal or a remote window. My application looks like: main () { ... .. frame = (Frame) xv_create (...); canvas = (Canvas) xv_create (...); menu = (Menu) xv_create (...); xv_main_loop (frame); } button_proc (...) { .. .. while (1) { XNextEvent (win_id_from_canvas, &myevent); if (myevent.type == ButtonPress) break; .... .... } } User selects an item in the menu which puts the control into button_proc. Then the program hangs on XNextEvent call. Occassionally, it gets perhaps one or two events, but hangs every time. Getting ButtonPress, ButtonRelease events directly from XNextEvent is essential in my application. If anyone has a workaround for this problem, please e-mail me at raghu@atc.com I tried calling "notify_stop ();" before calling XNextEvent but that did not help either. Thanks Raghothama Cauligi Advanced Technology Center Laguna Hills, CA raghu@atc.com (714) 583 - 9119