=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/plot/ox_plot_xevent.c,v retrieving revision 1.18 retrieving revision 1.21 diff -u -p -r1.18 -r1.21 --- OpenXM_contrib2/asir2000/plot/ox_plot_xevent.c 2002/07/20 02:28:08 1.18 +++ OpenXM_contrib2/asir2000/plot/ox_plot_xevent.c 2002/08/02 02:28:29 1.21 @@ -45,7 +45,7 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2000/plot/ox_plot_xevent.c,v 1.17 2002/07/12 00:14:40 takayama Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/plot/ox_plot_xevent.c,v 1.20 2002/07/30 03:54:36 noro Exp $ */ #include "ca.h" #include "parse.h" @@ -72,6 +72,7 @@ XFontStruct *sffs; #endif struct canvas *canvas[MAXCANVAS]; +struct canvas *closed_canvas[MAXCANVAS]; struct canvas *current_can; #endif /* __DARWIN__ */ @@ -81,7 +82,6 @@ struct canvas *current_can; #endif static char *dname; -static int remotes; static int depth,scrn; extern JMP_BUF ox_env; @@ -359,7 +359,12 @@ search_active_canvas() return -1; } - +void popup_canvas(index) +{ + clear_pixmap(canvas[index]); + XtPopup(canvas[index]->shell,XtGrabNone); + copy_to_canvas(canvas[index]); +} void destroy_canvas(w,can,calldata) Widget w; @@ -367,11 +372,14 @@ struct canvas *can; XtPointer calldata; { XtPopdown(can->shell); - XtDestroyWidget(can->shell); +/* XtDestroyWidget(can->shell); */ XFlush(display); if ( can == current_can ) { reset_busy(can); current_can = 0; } + if ( closed_canvas[can->index] ) + XtDestroyWidget(closed_canvas[can->index]->shell); + closed_canvas[can->index] = can; canvas[can->index] = 0; } @@ -530,8 +538,7 @@ struct canvas *can; width = can->width; height = can->height; - sprintf(buf,"%s : %d/%d", can->wname?can->wname:"Plot", - remotes,can->index); + sprintf(buf,"%s : %d", can->wname?can->wname:"Plot",can->index); XtSetArg(arg[0],XtNiconName,buf); can->shell = XtCreatePopupShell("shell",topLevelShellWidgetClass,toplevel,arg,1);