[haiku-appserver] Re: DisableUpdates() / EnableUpdates()

  • From: Adi Oanca <adioanca@xxxxxxxxx>
  • To: haiku-appserver@xxxxxxxxxxxxx
  • Date: Sat, 29 Oct 2005 18:05:28 +0300

DarkWyrm wrote:


I have a problem with these methods:

DisableUpdates() , EnableUpdates()
These functions disable automatic updating within the window, and re-enable it again. Any drawing that's done while updates are disabled is suppressed until updates are re-enabled. If you're doing a lot of drawing within the window, and you want the results of the drawing to appear all at once, you should disable updates, draw, and then re-
enable updates.

How do you think we should implement this? Do you how this is implemented in R5? Any other information related to these 2 methods?

I think that to do what the BeBook says ("the drawing to appear all at once") we should draw in a bitmap and when EnableUpdates() is called, copy/blit that bitmap in window's visible area.

Thoughts? Opinions?

Well, I just had a look at Be's sample code, and I think the answer is quite simple: Don't send _UPDATE_ message(s) until EnableUpdates() is called. Yes... I think it is THAT simple. :-)

Not that my opinion counts much anymore on the server

Hm... are left stepping into this day? Of course IT COUNTS! You are the Team Leader! ;-)

(I'm *so* out of the loop)

Doesn't matter. You can come back at any moment. Things are getting simpler and simpler in the server. :-)

Have a fun night! (I will! I'm going to the 6th wedding this year! :-) )

Other related posts: