[haiku-appserver] Re: GetMouse()

  • From: Adi Oanca <adioanca@xxxxxxxxxxxxxx>
  • To: haiku-appserver@xxxxxxxxxxxxx
  • Date: Mon, 30 May 2005 13:09:36 +0300

Axel Dörfler wrote:
> Adi Oanca <adioanca@xxxxxxxxxxxxxx> wrote:
>>Axel D=F6rfler wrote:
>>>As long as the looper is locked, it cannot process any messages, 
>>>therefore doesn't get updated, even if running in another thread - 
>>>that clearer=3F
>>      Not quite. :-)
>>      Maybe we are talking different things... To recall: you don't
>>agree with the fact that UpdateIfNeeded() must be called from 
>>thread only=3F
> Only in "extreme" situations like GetMouse(), yes.

        What makes GetMouse() "extreme"?

        Another question of mine, is why does GetMouse in R5/Haiku
dispatches _UPDATE_ messages?

        Yet another question. Once we have locked BWindow's thread
from another thread and we are drawing from there, why shouldn't we
be able to call UpdateIfNeeded() so that any pending update requests
be resolved from there too? We have locked the window thread, why not
be able to do almost all operations from another thread? I for
one, find it useful to call UpdateIfNeeded() from another thread from
which I'm drawing(and invalidating) stuff.

>>      BTW, if you to this:
>>      with our current implementation, it's quite possible you won't
>>get the result you're looking for (ie. the rect being redrawn). Why=3F 
>>=5FUPDATE=5F message may not yet have arrived in BWindow's port queue.
> Yes, but that's perfectly okay since you didn't use it properly :-)
> A Flush() would be what you have to use here.

        Not even a Sync() would assure me a _UPDATE_ message is in port's

>>(remember what I told you a couple weeks ago=3F)
> I've no idea what you're referring to, sorry.

    "I'm still not sure about this method. What I think it should do, is
process the _UPDATE_ request that is pending in the message queue, just
as GetMouse() does, and above that, it should query the server if there
still are invalid regions to be updated (regions that became invalid
since the server sent the last _UPDATE_ request) and if there are do,
get the data from the reply and do a DispatchMessage(updateMsg, this)


Other related posts: