diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2011-03-31 17:10:11 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2011-03-31 17:10:11 +0000 |
commit | 3af43a522766d59058b9355cb16ee279e5230d94 (patch) | |
tree | f4084ad45f058d1400d66b1a72d82cd0991944ad | |
parent | 59e0dac75d4fee2a535d9d38740d4eb563b052d8 (diff) | |
download | ports-3af43a522766d59058b9355cb16ee279e5230d94.tar.gz ports-3af43a522766d59058b9355cb16ee279e5230d94.zip |
Notes
-rw-r--r-- | www/nspluginwrapper-devel/Makefile | 2 | ||||
-rw-r--r-- | www/nspluginwrapper-devel/files/patch-ignore-flash-button3 | 55 |
2 files changed, 56 insertions, 1 deletions
diff --git a/www/nspluginwrapper-devel/Makefile b/www/nspluginwrapper-devel/Makefile index 856cc4ed6d02..cabfef3aafd1 100644 --- a/www/nspluginwrapper-devel/Makefile +++ b/www/nspluginwrapper-devel/Makefile @@ -7,7 +7,7 @@ PORTNAME= nspluginwrapper PORTVERSION= 1.3.0 -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= www linux emulators MASTER_SITES= LOCAL/jkim DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${BINFILE}${EXTRACT_SUFX} diff --git a/www/nspluginwrapper-devel/files/patch-ignore-flash-button3 b/www/nspluginwrapper-devel/files/patch-ignore-flash-button3 new file mode 100644 index 000000000000..1788efb06ed5 --- /dev/null +++ b/www/nspluginwrapper-devel/files/patch-ignore-flash-button3 @@ -0,0 +1,55 @@ +--- src/npw-wrapper.c.orig 2009-01-02 09:22:29.000000000 -0500 ++++ src/npw-wrapper.c 2011-03-31 12:34:33.000000000 -0400 +@@ -2560,6 +2561,35 @@ + return ret; + } + ++#define NPW_ADOBE_FLASH_PLUGIN "Shockwave Flash" ++ ++struct flash_version { ++ unsigned int major; ++ unsigned int minor; ++}; ++ ++// Detect Adobe Flash plugin version ++static void adobe_flash_version(struct flash_version *vers) ++{ ++ static struct flash_version fv = { 0, 0 }; ++ static bool tested = false; ++ ++ if (!tested) { ++ if (g_plugin.name != NULL && g_plugin.description != NULL && ++ strcmp(g_plugin.name, NPW_ADOBE_FLASH_PLUGIN) == 0 && ++ strncmp(g_plugin.description, NPW_ADOBE_FLASH_PLUGIN, ++ strlen(NPW_ADOBE_FLASH_PLUGIN)) == 0) { ++ char *ptr, *endp; ++ ptr = g_plugin.description + strlen(NPW_ADOBE_FLASH_PLUGIN); ++ fv.major = strtol(ptr, &endp, 10); ++ if (*endp == '.') ++ fv.minor = strtol(endp + 1, NULL, 10); ++ } ++ tested = true; ++ } ++ *vers = fv; ++} ++ + static int16 g_NPP_HandleEvent(NPP instance, void *event) + { + if (instance == NULL) +@@ -2569,6 +2599,16 @@ + if (plugin == NULL) + return NPERR_INVALID_INSTANCE_ERROR; + ++ if (((NPEvent *)event)->type == ButtonPress && ((XButtonEvent *)event)->button == Button3) { ++ static struct flash_version vers; ++ adobe_flash_version(&vers); ++ /* XXX: work around "right click" hang with Flash plugin 10.1 and later */ ++ if ((vers.major == 10 && vers.minor >= 1) || vers.major > 10) { ++ D(bug("NPP_HandleEvent instance=%p, ignoring ButtonPress event for " ++ NPW_ADOBE_FLASH_PLUGIN " %u.%u\n", instance, vers.major, vers.minor)); ++ return false; ++ } ++ } + 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 */ |