Commit 1692658e authored by Gildas Bazin's avatar Gildas Bazin

* modules/video_output/directx/events.c: fix for the mozilla plugin on vout close.

 The mozilla plugin seems to be working very well now, except that it doesn't receive mouse and keyboard events yet.
parent 765d8a39
......@@ -2,7 +2,7 @@
* events.c: Windows DirectX video output events handler
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: events.c,v 1.22 2003/08/28 15:59:04 gbazin Exp $
* $Id: events.c,v 1.23 2003/09/24 16:10:02 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -95,13 +95,15 @@ void DirectXEventThread( event_thread_t *p_event )
/* Main loop */
/* GetMessage will sleep if there's no message in the queue */
while( !p_event->b_die
&& GetMessage( &msg, p_event->p_vout->p_sys->hwnd, 0, 0 ) )
while( !p_event->b_die && ( p_event->p_vout->p_sys->hparent ||
GetMessage( &msg, p_event->p_vout->p_sys->hwnd, 0, 0 ) ) )
{
/* Check if we are asked to exit */
if( p_event->b_die )
break;
if( p_event->p_vout->p_sys->hparent ) msleep( INTF_IDLE_SLEEP );
switch( msg.message )
{
......@@ -515,6 +517,15 @@ static void DirectXCloseWindow( vout_thread_t *p_vout )
{
DestroyWindow( p_vout->p_sys->hwnd );
}
else if( p_vout->p_sys->hparent )
{
/* We don't want our windowproc to be called anymore */
SetWindowLong( p_vout->p_sys->hwnd,
GWL_WNDPROC, (LONG)p_vout->p_sys->pf_wndproc );
/* Blam! Erase everything that might have been there. */
InvalidateRect( p_vout->p_sys->hwnd, NULL, TRUE );
}
p_vout->p_sys->hwnd = NULL;
......
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