On Thu, Jun 20, 2002 at 06:20:09PM +0100, Angus Leeming wrote: > > Well I've only browsed your xforms email, but we need a sub-region not > > the entire workarea object, unless you fancy copying a massive pixmap on > > every cursor blink (didn't think so). > > That's what we do now. See the code in xscreen.C. Oh! you have ;-)
Eh ? No it isn't - without my patch, then we only XCopyArea() the amount of stuff that actually changed - see the optimizations in screen.C (we can do better, but that's by the by) > void fl_redraw_form(FL_FORM * form) > { > for (FL_OBJECT *ob = form->first; ob; ob = ob->next) { > if (withinBoundingBox(ob, BoundingBox)) > ob->redraw = 1; > } > redraw_marked(form, 0, 0); > } > > Furthermore, each object could decide whether it used this info or just > regenerate the entire pixmap. But this is not really relevant - the problem is not drawing of individual form elements (you mean xforms doesn't even do that ???) but the fact the entire pixmap has to be copied each time. > > xev != NULL, it's asking to draw the entire object. This is so broken I > > don't know where to begin shouting ... > > Sure. But this will be equally bad for all other toolkits too unless we can > think of some way of telling them which area to redraw. Eh ? screen::expose is already generating correctly sized rectangles (try it without my patch). This works great with Qt frontend. > Here's example 1 > Start LyX -> xev == 0. > presumably because LyXScreen::greyOut() doesn't call expose after it's called > the painter. > > Example 2. > Start LyX, open a buffer, close it. -> xev == 0 and > the displayed document is not replaced by a gray pixmap. > Same reasoning, since here the workarea paint method is called only if xev is > non-zero. Yes, this sounds like two bugs. Good call. regards john -- "If a thing is not diminished by being shared, it is not rightly owned if it is only owned & not shared." - St. Augustine