Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!cogswell!alan From: alan@cogswell.Jpl.Nasa.Gov (Alan S. Mazer) Newsgroups: comp.windows.x Subject: is this an xview bug? Message-ID: <1990May8.195733.304@elroy.jpl.nasa.gov> Date: 8 May 90 19:57:33 GMT Sender: news@elroy.jpl.nasa.gov (Usenet) Organization: Image Analysis Systems Grp, JPL Lines: 55 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 #include #include 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