Commit c8249bfb authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/skins/win32/*: fixed a problem with drag&drop when restarting the skins engine.
parent 46c6826d
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* win32_theme.cpp: Win32 implementation of the Theme class * win32_theme.cpp: Win32 implementation of the Theme class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: win32_theme.cpp,v 1.11 2003/10/23 16:00:48 gbazin Exp $ * $Id: win32_theme.cpp,v 1.12 2003/10/30 17:59:12 gbazin Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -172,6 +172,9 @@ Win32Theme::Win32Theme( intf_thread_t *_p_intf ) : Theme( _p_intf ) ...@@ -172,6 +172,9 @@ Win32Theme::Win32Theme( intf_thread_t *_p_intf ) : Theme( _p_intf )
} }
} }
// Initialize the OLE library
OleInitialize( NULL );
//Initialize value //Initialize value
ParentWindow = NULL; ParentWindow = NULL;
...@@ -201,6 +204,9 @@ Win32Theme::~Win32Theme() ...@@ -201,6 +204,9 @@ Win32Theme::~Win32Theme()
{ {
DestroyWindow( ParentWindow ); DestroyWindow( ParentWindow );
} }
// Uninitialize the OLE library
OleUninitialize();
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void Win32Theme::OnLoadTheme() void Win32Theme::OnLoadTheme()
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* win32_window.cpp: Win32 implementation of the Window class * win32_window.cpp: Win32 implementation of the Window class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: win32_window.cpp,v 1.14 2003/10/22 19:12:56 ipkiss Exp $ * $Id: win32_window.cpp,v 1.15 2003/10/30 17:59:12 gbazin Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -99,8 +99,6 @@ Win32Window::Win32Window( intf_thread_t *p_intf, HWND hwnd, int x, int y, ...@@ -99,8 +99,6 @@ Win32Window::Win32Window( intf_thread_t *p_intf, HWND hwnd, int x, int y,
// Drag & drop // Drag & drop
if( DragDrop ) if( DragDrop )
{ {
// Initialize the OLE library
OleInitialize( NULL );
DropTarget = (LPDROPTARGET) new Win32DropObject( playondrop ); DropTarget = (LPDROPTARGET) new Win32DropObject( playondrop );
// register the listview as a drop target // register the listview as a drop target
RegisterDragDrop( hWnd, DropTarget ); RegisterDragDrop( hWnd, DropTarget );
...@@ -112,21 +110,21 @@ Win32Window::~Win32Window() ...@@ -112,21 +110,21 @@ Win32Window::~Win32Window()
delete CursorPos; delete CursorPos;
delete WindowPos; delete WindowPos;
if( hWnd != NULL )
{
DestroyWindow( hWnd );
}
if( ToolTipWindow != NULL ) if( ToolTipWindow != NULL )
{ {
DestroyWindow( ToolTipWindow ); DestroyWindow( ToolTipWindow );
} }
if( DragDrop )
if( hWnd != NULL )
{ {
// Remove the listview from the list of drop targets if( DragDrop )
RevokeDragDrop( hWnd ); {
DropTarget->Release(); // Remove the listview from the list of drop targets
// Uninitialize the OLE library RevokeDragDrop( hWnd );
OleUninitialize(); DropTarget->Release();
}
DestroyWindow( hWnd );
} }
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
......
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