Commit a682b4f2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Reparenting does not work with set_parent.

It did not work in 1.0 either, and it was not safe in earlier versions.
Nobody ever bothered to implement thread-safe reparenting. Calling
libvlc_video_set_parent() is useless in 1.0: It has the same effect
as calling proper libvlc_media_player_set_*(), which the Mozilla
plugin already does.
parent 040930d2
......@@ -387,12 +387,6 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
{
/* check if plugin has a new parent window */
CGrafPtr drawable = (((NP_Port*) (window->window))->port);
if( !curwin.window || drawable != (((NP_Port*) (curwin.window))->port) )
{
/* set/change parent window */
libvlc_video_set_parent(p_vlc, (libvlc_drawable_t)drawable, &ex);
libvlc_exception_clear(&ex);
}
/* as MacOS X video output is windowless, set viewport */
libvlc_rectangle_t view, clip;
......@@ -422,9 +416,6 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
else if( curwin.window )
{
/* change/set parent */
libvlc_video_set_parent(p_vlc, 0, &ex);
libvlc_exception_clear(&ex);
curwin.window = NULL;
}
#endif /* XP_MACOSX */
......@@ -457,10 +448,6 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
style |= WS_CLIPCHILDREN|WS_CLIPSIBLINGS;
SetWindowLong((HWND)drawable, GWL_STYLE, style);
/* change/set parent */
libvlc_video_set_parent(p_vlc, (libvlc_drawable_t)drawable, &ex);
libvlc_exception_clear(&ex);
/* remember new window */
p_plugin->setWindow(*window);
......@@ -476,10 +463,6 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
SetWindowLong( oldwin, GWL_WNDPROC, (LONG)(p_plugin->getWindowProc()) );
p_plugin->setWindowProc(NULL);
/* change/set parent */
libvlc_video_set_parent(p_vlc, 0, &ex);
libvlc_exception_clear(&ex);
curwin.window = NULL;
}
#endif /* XP_WIN */
......@@ -529,10 +512,6 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
XtAddEventHandler( w, ButtonReleaseMask, FALSE,
(XtEventHandler)ControlHandler, p_plugin );
/* set/change parent window */
libvlc_video_set_parent( p_vlc, (libvlc_drawable_t) video, &ex );
libvlc_exception_clear(&ex);
/* remember window */
p_plugin->setWindow( *window );
p_plugin->setVideoWindow( video );
......@@ -553,9 +532,6 @@ NPError NPP_SetWindow( NPP instance, NPWindow* window )
}
else if( curwin.window )
{
/* change/set parent */
libvlc_video_set_parent(p_vlc, 0, &ex);
libvlc_exception_clear(&ex);
curwin.window = NULL;
}
#endif /* XP_UNIX */
......
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