-#if 0
- /* FIXME:
- * This code is utter crap w.r.t. threading. And it has always been.
- * First, one cannot invoke callbacks from another thread's object.
- * Not without a well-defined locking convention.
- *
- * Second, this would need to "wait" for the interface to be ready.
- * Otherwise, the availability of the embded window would become
- * time-dependent.
- *
- * In the past, this kind of things worked by accident. This time is over.
- * -- Courmisch, 12 Jun 2008
- */
- /* Find if the main interface supports embedding */
- p_list = vlc_list_find( p_vout, VLC_OBJECT_INTF, FIND_ANYWHERE );
- if( !p_list ) return NULL;
+ vout_window_t *wnd = vlc_custom_create (VLC_OBJECT(p_vout), sizeof (*wnd),
+ VLC_OBJECT_GENERIC, "window");
+ if (wnd == NULL)
+ return NULL;