NPError NPP_SetWindow(NPP instance, NPWindow *window) { PluginObject* obj = static_cast<PluginObject*>(instance->pdata); if (obj) { obj->lastWindow = *window; if (obj->logSetWindow) { pluginLog(instance, "NPP_SetWindow: %d %d", (int)window->width, (int)window->height); obj->logSetWindow = FALSE; } if (obj->onSetWindow) executeScript(obj, obj->onSetWindow); if (obj->testWindowOpen) { testWindowOpen(instance); obj->testWindowOpen = FALSE; } if (obj->testKeyboardFocusForPlugins) { obj->eventLogging = true; executeScript(obj, "eventSender.keyDown('A');"); } } return NPERR_NO_ERROR; }
NPError NPP_SetWindow(NPP instance, NPWindow *window) { PluginObject* obj = static_cast<PluginObject*>(instance->pdata); if (obj) { obj->lastWindow = *window; if (obj->onSetWindow) executeScript(obj, obj->onSetWindow); if (obj->testWindowOpen) { testWindowOpen(instance); obj->testWindowOpen = FALSE; } } return NPERR_NO_ERROR; }