alan@cogswell.Jpl.Nasa.Gov (Alan S. Mazer) (05/09/90)
I've just noticed that some of my canvas repaint/resize procedures are being called very strangely. Just for a simply frame/canvas creation, my resize procedure is called three times (with two different sizes) and the repaint procedure is called four times. Am I missing something here??? #include <xview/xview.h> #include <xview/canvas.h> #include <xview/xv_xrect.h> main() { Canvas canvas; Frame frame; void repaint(),resize(); frame = (Frame)xv_create(NULL,FRAME,XV_WIDTH,512,XV_HEIGHT,512,NULL); canvas = (Canvas)xv_create(frame,CANVAS,CANVAS_X_PAINT_WINDOW,TRUE, XV_WIDTH,512,XV_HEIGHT,512,CANVAS_REPAINT_PROC,repaint, CANVAS_RESIZE_PROC,resize,NULL); xv_main_loop(frame); } void repaint(canvas,pw,dpy,xwin,xrects) Canvas canvas; Xv_Window pw; Display *dpy; Window xwin; Xv_xrectlist *xrects; { printf("doing repaint\n"); } void resize(canvas,width,height) Canvas canvas; int width,height; { printf("doing resize (%d %d)\n",width,height); } produces doing resize (506 506) doing resize (506 436) doing resize (506 506) doing repaint doing repaint doing repaint doing repaint Is this a bug or am I just doing something wrong??? -- Alan # "But seriously, what could go wrong?" ..!cit-vax!elroy!alan alan@elroy.jpl.nasa.gov