https://bugzilla.novell.com/show_bug.cgi?id=447434
User sbrabec@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=447434#c4
--- Comment #4 from Stanislav Brabec 2008-11-26 05:40:00 MST ---
Reply from Gwenole Beauchesne:
Thanks for spotting this bug. The situation is even worse than that:
1) I am actually getting crashes because I should make NPN_ReleaseObject()
calls asynchronous
2) The XEMBED hack will also require Gtk equivalent to the Xt focus machinery.
I normally have that in some patches already from older experiments.
3) In XEMBED hack mode, it should be best to avoid Firefox use the GtkXtBin
object because it starts another 25 ms timer that is not necessary for Gtk
plugins. i.e. it's not really a power efficient thing to awake the plugin if we
know it has nothing to do in the first place.
Besides, commit rev 733 is actually wrong and should be reverted. Then (1) can
be implemented in two ways:
(i) schedule the NPN_ReleaseObject() invoke through an idle function. This is
not very efficient if we have to create/destroy the idle source each time an
async NPN_ReleaseObject() is needed.
(ii) schedule it through an internal "pipe" with a GSource listening on it and
then dispatching the async call
(i) is very simple to implement, (ii) is longer but it should be useful to
implement a more correct NPP_HandleEvent() at the same time and actually get
modal Gtk windows working with windowless plugins...
Lastly, I am starting to wonder if I shouldn't actually revert the XEMBED hack
mode and let distributors fix Firefox instead. The very minimal thing to do is
to allow calls to NPP_SetWindow() with NULL NPWindow::window fields. And, if
someone is motivated enough, a better fix should be done in Gtk2, IMHO. If any
of those is done, then USE_XEMBED_HACK can be disabled and everything should
work again correctly.
I don't like workarounds, they generally come back into your face sooner or
later, and badly in general. What you have just reported to me is a clear
example. :-(
Note: (2) and (3) have the same cause (the need for the XEMBED "hack mode").
(1) is another bug.
Regards,
Gwenole.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.