[haiku-commits] Re: haiku: hrev45852 - in src: apps/deskcalc kits/shared

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: "haiku-commits@xxxxxxxxxxxxx" <haiku-commits@xxxxxxxxxxxxx>
  • Date: Sun, 14 Jul 2013 17:14:35 -0400

On Sun, Jul 14, 2013 at 4:40 PM, John Scipione <jscipione@xxxxxxxxx> wrote:
> On Sunday, July 14, 2013, Axel Dörfler wrote:
>>
>> On 07/13/2013 10:47 PM, John Scipione wrote:
>>>>>
>>>>> If I keep the B_FULL_UPDATE_ON_RESIZE flag but don't Invalidate() in
>>>>> FrameResized() it redraws the view before FrameResized() gets called
>>>>> so the view gets drawn on resize, but incorrectly.
>>
>> [...]
>>>
>>> Okay, I have made a small test program and ran it on both BeOS R5 and
>>> Haiku. Haiku is definitely NOT compatible. With the
>>> B_FULL_UPDATE_ON_RESIZE flag set on the view BeOS R5 calls Draw() then
>>> FrameResized() while Haiku calls FrameResized() and then Draw().
>>
>>
>> You do realize that your original statement suggests the opposite? In that
>> light you should just remove the Invalidate() in FrameResized(), and add the
>> full-update-on-resize flag again.
>
> If I did that, it would not draw the keypad correctly at least not all the
> time. I may have been wrong about the order. It seems like app server does
> not call Draw() some of the time, just FrameResized() which is why calling
> Invalidate() works around the problem.

(I meant wrong about the order causing the problem, not wrong about
the order being reversed, it definitely is.)

I have confirmed my hypothesis with a bit of printf debugging on my
test program. App server occasionally drops the Draw() call which
causes the view to not be drawn correctly. Actually this happens on
both OS's but much more frequently on Haiku. I'm not sure if this is
intentional or not and I'm not sure how to trigger the bug, it just
seems to happen at random. It's not like if I resize the window
quickly it happens more often, it just occasionally doesn't call
Draw() and suddenly my red window is blue.

Other related posts: