rick@hanauma (Richard Ottolini) (03/12/90)
The following code fragment issues two repaint requests at initialization. I'd prefer only one, but can figure out to obtain such behavior. The first repaint request is the up right 64 x 64 of the window and the second is the whole window. No window size change occurs. canvas = xv_create (frame, CANVAS, CANVAS_REPAINT_PROC, MyDraw, WIN_DYNAMIC_VISUAL, TRUE, WIN_CMS_NAME, "grayscale", WIN_CMS_DATA, &cmsdata, 0); xv_set (canvas,CANVAS_FIXED_IMAGE,FALSE,0); window_fit (frame); If CANVAS_FIXED_IMAGE is set in the first call, it doesn't take hold. I set CANVAS_FIXED_IMAGE to force a repaint when resizing a window.
hvr@kimba.Sun.COM (Heather Rose) (03/17/90)
In article <652@med.Stanford.EDU> rick@hanauma (Richard Ottolini) writes: > > >The following code fragment issues two repaint requests at initialization. >I'd prefer only one, but can figure out to obtain such behavior. >The first repaint request is the up right 64 x 64 of the window >and the second is the whole window. No window size change occurs. > > canvas = xv_create (frame, CANVAS, > CANVAS_REPAINT_PROC, MyDraw, > WIN_DYNAMIC_VISUAL, TRUE, > WIN_CMS_NAME, "grayscale", > WIN_CMS_DATA, &cmsdata, > 0); > xv_set (canvas,CANVAS_FIXED_IMAGE,FALSE,0); > window_fit (frame); > >If CANVAS_FIXED_IMAGE is set in the first call, it doesn't take hold. >I set CANVAS_FIXED_IMAGE to force a repaint when resizing a window. Problem 1, multiple repaints, is a known bug, id # 1025288, which we're looking into. What we believe to be happening is that the server is returning two Expose events after the MapWindow request for the canvas paint window. The first event has the size at 64x64, and the second at the application's requested size. Problem 2, CANVAS_FIXED_IMAGE, is also a known bug, id # 1032551, which has been fixed in the next release. __________________________________________________________________ Heather Rose Window Systems Group internet: hrose@sun.com Sun Microsystems, Inc. uucp: ...!sun!hrose