Boris Zbarsky <[EMAIL PROTECTED]> wrote: > Ben Hutchings wrote: >> Then I guess the problem I'm having is that changes to images (which >> are what I'm hoping to trigger) are asynchronous... > > Yes, changes to images are typically asynchronous. In fact, depending on > what > the change is, they might have to hit the network, right?
Yes, that much is obvious. I'm using GtkMozEmbed and handling net_state_all signals (I think those correspond to nsIWebProgressListener::OnStateChange) in order to tell when pages have finished loading. I have now changed the signal handler to update a count of how many requests have started but not stopped, so when dispatchEvent returns and I find that the count is non-zero I know I need to wait for it to become zero. In the mean time I have to pump the event loop, of course. If I run the usual Gtk event loop, however, the requests for images never complete. If I ignore the request count and continue without waiting, I find that the image requests complete during the next call to dispatchEvent (which is too late). Do you have any idea what I should be doing differently? -- Ben Hutchings Never attribute to conspiracy what can adequately be explained by stupidity. _______________________________________________ mozilla-embedding mailing list mozilla-embedding@mozilla.org http://mail.mozilla.org/listinfo/mozilla-embedding