[haiku-development] Re: BDirectWindow::GetClippingRegion implementation wrong?

  • From: Jérôme Duval <jerome.duval@xxxxxxxxx>
  • To: haiku-development <haiku-development@xxxxxxxxxxxxx>
  • Date: Sun, 18 Nov 2012 11:52:01 +0100

2012/11/18 Julian Harnath <julian.harnath@xxxxxxxxxxxxxx>:
> The BeBook says that BDirectWindow::GetClippingRegion() MUST be called
> from within BDirectWindow::DirectConnected(), otherwise invalid results
> are returned. Haiku's implementation though does the opposite:
>
> ---- snip ----
> if (fInDirectConnect) {
>                 _UnlockDirect();
>                 return B_ERROR;
>         }
> ---- snip ----
>
> I think it should be "if (!fInDirectConnect)" instead (but I didn't
> test that yet). Since I can't find any sample code actually using this
> function it might just be me misunderstanding it though.

I think you're right, the code didn't change mostly since hrev4755.
Stefano might shed light on this point.

Bye,
Jérôme

Other related posts: