Wow... (<-- blown away at performance)
Jung-uk Kim
jkim at FreeBSD.org
Thu Mar 31 05:58:43 UTC 2011
On Wednesday 30 March 2011 04:54 pm, Alexander Best wrote:
> On Wed Mar 30 11, Jung-uk Kim wrote:
> > On Wednesday 30 March 2011 12:50 pm, Jung-uk Kim wrote:
> > > On Wednesday 30 March 2011 12:46 am, Buganini wrote:
> > > > It seems work well now, no lockup when I went through pages.
> > > > but I still got lockup when I right-click on some flash
> > > > advertisement. for example, here: http://tw.yahoo.com/
> > >
> > > "Don't do that" is not an answer, I guess? ;-)
> > >
> > > Seriously, this problem is very well known. There were several
> > > work-arounds suggested but the most popular one is setting
> > > GDK_NATIVE_WINDOWS environment variable. Try
> > > "GDK_NATIVE_WINDOWS Flash" on Google and you will see tons of
> > > them. Actually, Fedora took that hack into nspluginwrapper
> > > later:
> > >
> > > https://bugzilla.redhat.com/show_bug.cgi?id=542424
> > >
> > > Basically, Gnome people broke the ABI in the middle of major
> > > release branch, if my understanding is correct. Of course,
> > > that caused a lot of complaints and they had to add the
> > > variable to restore the previous behavior. Now here is the bad
> > > news for you. This environment variable does nothing for us
> > > because
> > > linux-f10-gtk2-2.14.7 does not have the compat hack. :-(
> > >
> > > One thing we can do is re-rolling linux-f10-gtk2 with the hack
> > > locally (as we did for x11-toolkits/linux-f10-pango) and using
> > > the hack from www/nspluginwrapper-devel *iff* that actually
> > > fixes the problem.
> > >
> > > There was another attempt by PC-BSD to address this issue:
> > >
> > > http://trac.pcbsd.org/changeset/3799
> > >
> > > Unfortunately, I have no idea how Pango can affect the "right
> > > click" problem in the first place. In fact, I wasn't able to
> > > reproduce the fix on FreeBSD (long ago) and I *thought* their
> > > fix is PBI-specific (kmoore added to CC list).
> >
> > I forgot one important thing. Actually, this problem only
> > started happening from Flash plugin 10.1. So, the easist
> > workaround is going back to the last 10.0 release (e.g.,
> > 10.0.45.2 does not have this issue). You can find old versions
> > from here:
>
> just wanted to report that the bug still exists in flash 11.
I wrote an ugly but very simple workaround. Drop the attached patch
in www/nspluginwrapper-devel/files and replaces old one, rebuild,
reinstall, redo plugin wrappers, etc., etc...
Cheers,
JK
> > http://kb2.adobe.com/cps/142/tn_14266.html
> >
> > FYI, the following Chromium PR has the most plausible root-cause
> > analysis of this problem I've ever seen on the Net:
> >
> > http://code.google.com/p/chromium/issues/detail?id=40157
> >
> > Just in case if anyone is capable and willing to fix it for
> > good...
> >
> > Jung-uk Kim
-------------- next part --------------
--- src/npw-wrapper.c.orig 2011-03-30 19:53:27.000000000 -0400
+++ src/npw-wrapper.c 2011-03-30 19:54:15.000000000 -0400
@@ -30,6 +30,7 @@
#include <unistd.h>
#include <signal.h>
#include <semaphore.h>
+#include <signal.h>
#include <sys/wait.h>
#include <glib.h>
@@ -2560,6 +2561,24 @@
return ret;
}
+#define NPW_ADOBE_FLASH_NAME "Shockwave Flash"
+
+// Detect Adobe Flash plugin version
+static float is_adobe_flash(void)
+{
+ static float version = 0.0;
+ static bool tested = false;
+
+ if (!tested) {
+ if (strcmp(g_plugin.name, NPW_ADOBE_FLASH_NAME) == 0 &&
+ strncmp(g_plugin.description, NPW_ADOBE_FLASH_NAME,
+ strlen(NPW_ADOBE_FLASH_NAME)) == 0)
+ version = strtof(g_plugin.description + strlen(NPW_ADOBE_FLASH_NAME), NULL);
+ tested = true;
+ }
+ return version;
+}
+
static int16 g_NPP_HandleEvent(NPP instance, void *event)
{
if (instance == NULL)
@@ -2569,6 +2588,13 @@
if (plugin == NULL)
return NPERR_INVALID_INSTANCE_ERROR;
+ if (((NPEvent *)event)->type == ButtonPress &&
+ ((XButtonEvent *)event)->button == Button3 &&
+ is_adobe_flash() >= 10.1) {
+ /* XXX: work around "right click" hang with Flash plugin 10.1 and later */
+ D(bug("NPP_HandleEvent instance=%p: Button3 pressed on SWF\n", instance));
+ return true;
+ }
if (((NPEvent *)event)->type == GraphicsExpose) {
/* XXX: flush the X output buffer so that the call to
gdk_pixmap_foreign_new() in the viewer can work */
More information about the freebsd-current
mailing list