GNOME Bugzilla – Bug 757940
Browser plugin should be windowless
Last modified: 2015-11-17 17:42:24 UTC
It's currently windowed and claiming to need XEmbed, but we never create the GtkPlug to connect to the GtkSocket created by the browser, since we don't event implement NPP_SetWindow.
Created attachment 315254 [details] [review] browser-plugin: Set windowless mode and don't claim to need XEmbed
Review of attachment 315254 [details] [review]: Ah. I added the XEmbed code simply because without it, WebKit thought it required Xt, which it spat out an error for. Good to know there's a way around that.
(In reply to Jasper St. Pierre from comment #2) > Review of attachment 315254 [details] [review] [review]: > > Ah. I added the XEmbed code simply because without it, WebKit thought it > required Xt, which it spat out an error for. Yes, since WebKit2 we don't support windowed plugins without XEmbed. > Good to know there's a way around that. I think the confusing part is that NPAPI plugins are windowed by default, so windowless plugins like this one need to explicitly set windowless mode at startup.
Comment on attachment 315254 [details] [review] browser-plugin: Set windowless mode and don't claim to need XEmbed Pushed to both branches
(In reply to Carlos Garcia Campos from comment #4) > Comment on attachment 315254 [details] [review] [review] > browser-plugin: Set windowless mode and don't claim to need XEmbed > > Pushed to both branches browser plugin crash in firefox https://bugzilla.gnome.org/show_bug.cgi?id=758035
Reverted to fix bug #758035 :/
I'll check firefox code.
Created attachment 315733 [details] [review] Updated patch The problem is that windowless plugins are supposed to handle events (windowed plugins already receive the events themselves), so browsers call NPP_HandleEvent which is uninitialized and unimplemented in our plugins (browsers don't null check most of the plugin function pointers, anyway). I don't know why firefox is sending events to the plugin that is hidden (offscreen), but we can just implement NPP_HandleEvent to ignore events. This makes the plugin work in firefox.
Gracias!
Florian, you might want to do a new release over this. Sorry for the breakage.