[haiku-commits] Re: r37939 - haiku/trunk/src/servers/app

  • From: Stephan Assmus <superstippi@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 07 Aug 2010 11:12:10 +0200

On 2010-08-07 at 09:10:20 [+0200], Stefano Ceccherini 
<stefano.ceccherini@xxxxxxxxx> wrote:
> 2010/8/6 Stephan Assmus <superstippi@xxxxxx>:
> 
> > I've read the ticket, but am too lazy to look up what problem you thought 
> > was
> > reintroduced but actually isn't... :-) Does my other reply already answer
> > your question?
> 
> Nope :)
> My question is: since there is lot of code duplication in ServerWindow
> and ServerPicture, I'd like to move some of this code into
> ServerWindow (or View) methods. These methods would do some
> housekeeping (coordinate conversion, mostly) and then call the
> DrawingEngine drawing methods (DrawRect, etc.).
> I'd be for putting those methods inside ServerWindow, although from
> looking at the header, they don't fit much in there, but neither in
> View.
> Any advice ?
> They need to have public visibility, since they need to be called from
> ServerPicture too.

Yes, refactoring that would be cool. It's been a while that I looked closely 
at this code, but I would have to to give a decent answer. I am leaning 
towards ServerWindow, but I am at the same time wondering why it can't be in 
DrawingEngine. There is probably a reason... :-}

Best regards,
-Stephan

Other related posts: