Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#3 Several ListTree instances

open
nobody
None
5
2003-08-12
2003-08-12
Anonymous
No

Because of the ListTree handling of GCs, when two
listTree instances are running in the same app, the
widget might be wrongly clipped for one of them (when
changing the size of one of them).

The problem is that all instances SHARE the GCs, so if
one instance clips the GC it will clip all instances
GCs (and the effect will appear at next redisplay of
any of the other instances)

To solve this problem, the piece of code related to
XSetClipRectangles at ResizeStuff() should be moved to
Draw() method since it is the only way to ensure that
clipping is compatible with current drawing.
I've tested doing so and now works perfectly, at
ResizeStuff I only store the desired clipping at the
usual widget variables (w->list.viewWidth, etc.) and at
Draw() I do the clipping using those values ;-)

Discussion

  • dyOKN1 I value the blog.Much thanks again.