[haiku-appserver] Re: investigating some bugs

  • From: Adi Oanca <adioanca@xxxxxxxxxxxxx>
  • To: haiku-appserver@xxxxxxxxxxxxx
  • Date: Mon, 28 Mar 2005 23:10:19 +0300

Hi Stephan,

Stephan Assmus wrote:
> Hi Adi,
>>>but the 
>>>clipping of the views they contain seems to be wrong. At least I 
>>>see these views draw correctly, with the result being pretty much 
>>>same wether my Painter driver is used or the ViewDriver. See src/
>>>servers/app/windows. After I added more stuff there, I started to 
>>>bits of drawing way outside the windows too.
>>      I think this is your fault. :-P
>>      I don't know if I can help with this one...
> As I wrote above, the results are the same with your original 
> ViewDriver and the Painter based implementation. I have investigated a 
> little further and I'm relatively sure that the problem is in the 
> clipping and invalidation of the views.

> show the view contents either. Views simply don't draw themselfs (or 
> only tiny bits of them), or they have the wrong clipping region applied 
> to them.

        Ahhhh. How could I forget this?! :-) Me and DW know about this, don't 
know if that discussion took place over this list or private, so I'll 
tell you what is it about, again maybe.
        It's about the update code. What happens is simple: there is a region, 
fUpdate, which is used for clipping purposes. Now, this region is 
accessed by both RootLayer and ServerWindow threads - RootLayer writes 
into it the new invalid region, ServerWindow uses that and empties it. I 
know this should be protected by a semaphore, but it isn't, and the 
solution isn't simple either (also not that hard :-P). From this point 
you can elaborate: BView::Draw(rect) is given a rect in which it maybe 
isn't allowed to draw anymore because RootLayer changed fUpdate region.
        I have told you I am putting the final pieces of layer management 
together, so please be patient. app_server's state is in quite good 
condition for usual development and testing. Please don't get impatient, 
I have full time day job, only 2 hands and a pair of tired eyes. :-) Oh, 
let's not forget about a fried brain. :-)) :-P
        You will have to wait until I'm ready(soon) with this window management 
stuff ; next on my list is exactly the update code.

        Now, I have tested you 'Window' application, but nothing happens with 
the app_server running on my machine... I moved, resized, clicked, 
closed those windows, yet app_server did not enter an endless loop. 
Maybe you can help by providing the exact steps on how to reproduce this 


Other related posts: