On 2010-02-14 at 06:11:07 [+0100], Rene Gollent <anevilyak@xxxxxxxxx> wrote: > On Sat, Feb 13, 2010 at 5:32 PM, Stephan Assmus <superstippi@xxxxxx> wrote: > >> This is suppose to fast-forward to the last message of a kind from within > >> WebProcess::MessageReceived(). WebProcess is a BHandler attached to the > >> BApplication. If there are more than one web pages open, there will be > >> one > >> WebProcess per page. And you can probably already see the problem. I am > >> stealing messages from the other processes, and worst case, I end up > >> processing a BMessage intended for another WebProcess. Is there any way > >> to > >> detect the intended BHandler target of a BMessage when peaking into the > >> queue like that? > > > > The problem I see here is that at the point where the message is just > in the message queue, you can't guarantee to reliably know its target, > since both BMessageFilters and BLooper::DispatchMessage() can redirect > the message somewhere else entirely. Any thoughts on how to work > around that? Yeah, I solved the problem by tagging the messages when I send them. It would probably be too much overhead anyway, to find the target using the method that BLooper uses. Best regards, -Stephan