Commit f8b9c6f9 authored by Gildas Bazin's avatar Gildas Bazin

* modules/video_output/directx/events.c: closing the video window doesn't...

* modules/video_output/directx/events.c: closing the video window doesn't doesn't exit vlc anymore, it just stops the current stream.
* modules/gui/wxwindows/*: fix for popup menu placement.
parent 33b6abb6
......@@ -2,7 +2,7 @@
* dialogs.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: dialogs.cpp,v 1.2 2003/07/17 18:58:23 gbazin Exp $
* $Id: dialogs.cpp,v 1.3 2003/07/18 11:39:39 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -244,14 +244,7 @@ void DialogsProvider::Open( int i_access_method, int i_arg )
void DialogsProvider::OnPopupMenu( wxCommandEvent& event )
{
wxPoint mousepos = wxGetMousePosition();
#if 0
wxMouseEvent event = wxMouseEvent( wxEVT_RIGHT_UP );
event.m_x = p_main_interface->ScreenToClient(mousepos).x;
event.m_y = p_main_interface->ScreenToClient(mousepos).y;
#endif
wxPoint mousepos = ScreenToClient( wxGetMousePosition() );
::PopupMenu( p_intf, this, mousepos );
}
......@@ -2,7 +2,7 @@
* interface.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: interface.cpp,v 1.47 2003/07/17 18:58:23 gbazin Exp $
* $Id: interface.cpp,v 1.48 2003/07/18 11:39:39 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -541,14 +541,12 @@ void Interface::OnContextMenu2(wxContextMenuEvent& event)
{
if( p_intf->p_sys->pf_show_dialog )
p_intf->p_sys->pf_show_dialog( p_intf, INTF_DIALOG_POPUPMENU, 0 );
//::PopupMenu( p_intf, this, ScreenToClient(event.GetPosition()) );
}
#endif
void Interface::OnContextMenu(wxMouseEvent& event)
{
if( p_intf->p_sys->pf_show_dialog )
p_intf->p_sys->pf_show_dialog( p_intf, INTF_DIALOG_POPUPMENU, 0 );
//::PopupMenu( p_intf, this, event.GetPosition() );
}
void Interface::OnExit( wxCommandEvent& WXUNUSED(event) )
......
......@@ -2,7 +2,7 @@
* timer.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: timer.cpp,v 1.27 2003/07/17 18:58:23 gbazin Exp $
* $Id: timer.cpp,v 1.28 2003/07/18 11:39:39 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -97,24 +97,6 @@ void Timer::Notify()
vlc_mutex_lock( &p_intf->change_lock );
/* If the "display popup" flag has changed */
if( p_intf->p_sys->b_popup_change )
{
#if 0
wxPoint mousepos = wxGetMousePosition();
wxMouseEvent event = wxMouseEvent( wxEVT_RIGHT_UP );
event.m_x = p_main_interface->ScreenToClient(mousepos).x;
event.m_y = p_main_interface->ScreenToClient(mousepos).y;
p_main_interface->AddPendingEvent(event);
#endif
if( p_intf->p_sys->pf_show_dialog )
p_intf->p_sys->pf_show_dialog( p_intf, INTF_DIALOG_POPUPMENU, 0 );
p_intf->p_sys->b_popup_change = VLC_FALSE;
}
/* Update the input */
if( p_intf->p_sys->p_input == NULL )
{
......@@ -301,7 +283,8 @@ static int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable,
{
intf_thread_t *p_intf = (intf_thread_t *)param;
p_intf->p_sys->b_popup_change = VLC_TRUE;
if( p_intf->p_sys->pf_show_dialog )
p_intf->p_sys->pf_show_dialog( p_intf, INTF_DIALOG_POPUPMENU, 0 );
return VLC_SUCCESS;
}
......@@ -2,7 +2,7 @@
* wxwindows.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: wxwindows.cpp,v 1.18 2003/07/17 17:30:40 gbazin Exp $
* $Id: wxwindows.cpp,v 1.19 2003/07/18 11:39:39 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -129,7 +129,6 @@ static int Open( vlc_object_t *p_this )
p_intf->p_sys->i_slider_pos = p_intf->p_sys->i_slider_oldpos = 0;
p_intf->p_sys->p_popup_menu = NULL;
p_intf->p_sys->b_popup_change = VLC_FALSE;
p_intf->pf_show_dialog = NULL;
......
......@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: wxwindows.h,v 1.44 2003/07/17 18:58:23 gbazin Exp $
* $Id: wxwindows.h,v 1.45 2003/07/18 11:39:39 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -86,7 +86,6 @@ struct intf_sys_t
/* Popup menu */
wxMenu *p_popup_menu;
vlc_bool_t b_popup_change;
};
#endif /* !defined(MODULE_NAME_IS_skins) */
......
......@@ -2,7 +2,7 @@
* events.c: Windows DirectX video output events handler
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: events.c,v 1.17 2003/05/26 19:26:53 gbazin Exp $
* $Id: events.c,v 1.18 2003/07/18 11:39:39 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -196,8 +196,8 @@ void DirectXEventThread( event_thread_t *p_event )
}
else
{
/* exit application */
p_event->p_vout->p_vlc->b_die = VLC_TRUE;
/* close video window */
PostMessage( msg.hwnd, WM_CLOSE, 0, 0 );
}
break;
......@@ -660,10 +660,19 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
/* the user wants to close the window */
case WM_CLOSE:
msg_Dbg( p_vout, "WinProc WM_CLOSE" );
/* exit application */
p_vout->p_vlc->b_die = VLC_TRUE;
{
playlist_t * p_playlist =
(playlist_t *)vlc_object_find( p_vout, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
return;
}
playlist_Stop( p_playlist );
vlc_object_release( p_playlist );
return 0;
}
/* the window has been closed so shut down everything now */
case WM_DESTROY:
......@@ -724,4 +733,3 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
return DefWindowProc(hwnd, message, wParam, lParam);
}
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