bb@isatis.ensmp.fr (Bruno BARON <baron@ensmp.fr>) (04/23/91)
X server blocked by XView applications When I am right, an XView application blocks the X server until it begins managing its last currently available event. It is specially painful when you are debugging an XView application, or when this application is stopped! This program illustrates this point by using a long callback routine (5 seconds). When the sleep button is selected twice, no more event is accounted by the server (and no application can get events) until the first call to sleep returns. #include <xview/xview.h> #include <xview/panel.h> Frame frame; Panel panel; sleep() { system(" sleep 5 "); } create_main_window() { frame = xv_create(NULL, FRAME, FRAME_LABEL, "Simple test", NULL); panel = (Panel) xv_create(frame, PANEL, NULL); xv_create(panel, PANEL_BUTTON, PANEL_LABEL_STRING, "Sleep", PANEL_NOTIFY_PROC, sleep, NULL); window_fit(panel); window_fit(frame); } main(argc,argv) int argc; char *argv[]; { xv_init(XV_INIT_ARGC_PTR_ARGV, &argc, argv, 0); create_main_window(); xv_main_loop(frame); } My questions are the following: Why does XView present this shortcoming? How to avoid it? Thank you for your attention. (baron@ensmp.fr) -- Bruno BARON -- CRI, Ecole des Mines de Paris, 35 rue Saint Honore', 77305 Fontainebleau, -- France -- baron@ensmp.fr -- tel: (1)64.69.48.38 -- fax: (1)64.69.47.09