Commit 910868e2 authored by damienf's avatar damienf
Browse files

npmac.cpp: forgot one line from Charles Duffy OS X/Intel patch

vlcshell.cpp: improved FireFox/OSX support 
parent 961d6594
......@@ -1156,7 +1156,7 @@ NPError NP_GetEntryPoints(NPPluginFuncs* pluginFuncs)
pluginFuncs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR;
pluginFuncs->size = sizeof(NPPluginFuncs);
pluginFuncs->newp = Private_New;
pluginFuncs->newp = NewNPP_NewProc(Private_New);
pluginFuncs->destroy = NewNPP_DestroyProc(Private_Destroy);
pluginFuncs->setwindow = NewNPP_SetWindowProc(Private_SetWindow);
pluginFuncs->newstream = NewNPP_NewStreamProc(Private_NewStream);
......
......@@ -176,6 +176,7 @@ int16 NPP_HandleEvent( NPP instance, void * event )
}
}
}
fprintf(stderr, "update !\n");
if( needsDisplay )
{
const NPWindow *npwindow = p_plugin->getWindow();
......@@ -185,6 +186,9 @@ int16 NPP_HandleEvent( NPP instance, void * event )
ForeColor(blackColor);
PenMode( patCopy );
/* seems that firefox forgets to set the following on occasion (reload) */
SetOrigin(((NP_Port *)npwindow->window)->portx, ((NP_Port *)npwindow->window)->porty);
Rect rect;
rect.left = 0;
rect.top = 0;
......@@ -329,7 +333,7 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
view.left = ((NP_Port*) (window->window))->portx;
view.bottom = window->height+view.top;
view.right = window->width+view.left;
fprintf(stderr, "window.x=%d, window.y=%d, port.x=%d, port.y=%d\n", window->x, window->y, view.top, view.left);
/* clipRect coordinates are also relative to GrafPort */
clip.top = window->clipRect.top;
clip.left = window->clipRect.left;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment