From 65ef09da15b75cce7f917265f081281bfc09c0e6 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Wed, 14 Sep 2011 10:55:56 -0400 Subject: [PATCH] Hard-code NPNVsupportsAdvancedKeyHandling to FALSE In case a plugin attempts to check this (unlikely as no browser implements it yet) and avoid NULL checks on all the entry points, we shouldn't crash. Also, for correctness, even if the browser supports it, a browser + nspluginwrapper combination doesn't. --- src/npw-viewer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/npw-viewer.c b/src/npw-viewer.c index ef29f32..377b06d 100644 --- a/src/npw-viewer.c +++ b/src/npw-viewer.c @@ -1184,12 +1184,16 @@ g_NPN_GetValue(NPP instance, NPNVariable variable, void *value) } *((GdkNativeWindow *)value) = GDK_WINDOW_XWINDOW(plugin->browser_toplevel); break; + // TODO: when AdvancedKeyHandling hooks are supported, proxy this value over + // from the browser. + case NPNVsupportsAdvancedKeyHandling: + *(NPBool*)value = FALSE; + break; case NPNVSupportsWindowless: case NPNVSupportsXEmbedBool: case NPNVWindowNPObject: case NPNVPluginElementNPObject: case NPNVprivateModeBool: - case NPNVsupportsAdvancedKeyHandling: case NPNVdocumentOrigin: return g_NPN_GetValue_real(instance, variable, value); default: