Commit 02e2368f authored by Olivier Teulière's avatar Olivier Teulière

* skins2/win32/*: Embedded vout works on Windows too. It still

   segfaults when the mouse is moved above the video...
parent 8c9cd3a2
......@@ -223,7 +223,7 @@ OSWindow *Win32Factory::createOSWindow( GenericWindow &rWindow, bool dragDrop,
bool playOnDrop, OSWindow *pParent )
{
return new Win32Window( getIntf(), rWindow, m_hInst, m_hParentWindow,
dragDrop, playOnDrop );
dragDrop, playOnDrop, (Win32Window*)pParent );
}
......
......@@ -37,14 +37,26 @@
Win32Window::Win32Window( intf_thread_t *pIntf, GenericWindow &rWindow,
HINSTANCE hInst, HWND hParentWindow,
bool dragDrop, bool playOnDrop ):
bool dragDrop, bool playOnDrop,
Win32Window *pParentWindow ):
OSWindow( pIntf ), m_dragDrop( dragDrop ), m_mm( false )
{
// Create the window
m_hWnd = CreateWindowEx( WS_EX_TOOLWINDOW,
"SkinWindowClass", "default name", WS_POPUP, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hParentWindow, 0,
hInst, NULL );
if( pParentWindow )
{
// Child window (for vout)
HWND hParent = pParentWindow->getHandle();
m_hWnd = CreateWindowEx( WS_EX_TOOLWINDOW, "SkinWindowClass",
"default name", WS_CHILD, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, hParent, 0, hInst, NULL );
}
else
{
// Normal window
m_hWnd = CreateWindowEx( WS_EX_TOOLWINDOW, "SkinWindowClass",
"default name", WS_POPUP, CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT, hParentWindow, 0, hInst, NULL );
}
if( !m_hWnd )
{
......@@ -69,6 +81,13 @@ Win32Window::Win32Window( intf_thread_t *pIntf, GenericWindow &rWindow,
// Register the window as a drop target
RegisterDragDrop( m_hWnd, m_pDropTarget );
}
// XXX: Kludge to tell VLC that this window is the vout
if( pParentWindow )
{
vlc_value_t value;
value.i_int = (int) (ptrdiff_t) (void *) m_hWnd;
var_Set( getIntf()->p_vlc, "drawable", value );
}
}
......
......@@ -36,7 +36,8 @@ class Win32Window: public OSWindow
public:
Win32Window( intf_thread_t *pIntf, GenericWindow &rWindow,
HINSTANCE hInst, HWND hParentWindow,
bool dragDrop, bool playOnDrop );
bool dragDrop, bool playOnDrop,
Win32Window *pParentWindow );
virtual ~Win32Window();
// Show the window
......
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