[haiku-appserver] Re: r14920 - haiku/trunk/src/servers/app

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: "Haiku app_server" <haiku-appserver@xxxxxxxxxxxxx>
  • Date: Wed, 16 Nov 2005 17:13:31 +0100 CET

Adi Oanca <adioanca@xxxxxxxxx> wrote:
> On 11/16/05, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote:
> > layer - maybe it should be called GetRootLayerIntersection() then?
>    Ufff, it's not clear at all. Intersect with what RootLayer region?
> AFAIUnderstand, I'm requesting the intersection with the visible
> region of RootLayer, which definitely does not do.

I honestly don't know why you keep reading "visible" out of everywhere,
though ;-)

> > It's always problematic if a super class knows its sub classes - I
> > would consider this a bug in the design, anyway, and I will try to
> > get
> > rid of this during refactoring.
>    Clipping code is in Layer class. It needs to know about the screen
> bounds somehow.

Sorry, and again, I don't agree at all. This is a basic point in good
class design - it should only be neglected if no other way is possible
(usually for work-arounds of bugs in other (closed) code).
I consider the current design of the Layer/RootLayer class to be
broken; I don't see any reason why Layer should know the RootLayer
class at all.

Therefore, I'll do the following next (when resuming to work on that
a) I will introduce GetExtent() as proposed
b) I will fix the design and remove *all* RootLayer references in the
layer class
(and if that includes a RootLayer::GetIntersectWith() or whatever is
necessary, so be it - if you're not happy with that name, just propose
another one, of course)

Any objections?


Other related posts: