Axel Dörfler wrote: > Adi Oanca <adioanca@xxxxxxxxxxxxx> wrote: > >>>+// NOTE: I added this here and it solves the invalid region >>>problem >>>+// for Windows that have been resized before they were shown. - >>>Stephan >>>+RebuildFullRegion(); >>>+SendViewCoordUpdateMsg(); >>>+ >>>+ if (invalidate) >>> GetRootLayer()->GoInvalidate(this, fFull); >>> } >> >> You should, under no circumstances call RebuildFullRegion() from >>another thread than RootLayer's one. I can guarantee this can have >>very >>ugly consequences. For example try moving a window while you show/ >>hide >>another. > > Okay, but how should it be done instead, then? The 2 lines below Stephan's ones do the right thing. They send a message to RootLayer's thread telling it what to invalidate. Now that I look better, it looks that Stephan did not proceeded badly. The first time when I read those lines I was under impression I saw RebuildFullRegionS() which was very bad, but NOW I see the 's' is absent, and that's a very good thing! :-) No, the change is fine for the present clipping code. In fact I would congratulate Stephan for pulling this off - it shows he understood the clipping code. :-) > Also, if the app_server crashes, it's almost always in the layer code - > I don't see any obvious bugs in there, so it seems to be a locking > problem. True. There some small things left to be done. I know them, but if you can tell me the situations in which these problems occur it would be of help too. > Those bugs were already there before Stephan's changes. Can > you have a look at it when you're done with the clipping stuff? Sure. It's next on my list. bye, Adi.