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 @@ ...@@ -2,7 +2,7 @@
* dialogs.cpp : wxWindows plugin for vlc * dialogs.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * 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> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -244,14 +244,7 @@ void DialogsProvider::Open( int i_access_method, int i_arg ) ...@@ -244,14 +244,7 @@ void DialogsProvider::Open( int i_access_method, int i_arg )
void DialogsProvider::OnPopupMenu( wxCommandEvent& event ) void DialogsProvider::OnPopupMenu( wxCommandEvent& event )
{ {
wxPoint mousepos = wxGetMousePosition(); wxPoint mousepos = ScreenToClient( 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
::PopupMenu( p_intf, this, mousepos ); ::PopupMenu( p_intf, this, mousepos );
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* interface.cpp : wxWindows plugin for vlc * interface.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * 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> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -541,14 +541,12 @@ void Interface::OnContextMenu2(wxContextMenuEvent& event) ...@@ -541,14 +541,12 @@ void Interface::OnContextMenu2(wxContextMenuEvent& event)
{ {
if( p_intf->p_sys->pf_show_dialog ) 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->pf_show_dialog( p_intf, INTF_DIALOG_POPUPMENU, 0 );
//::PopupMenu( p_intf, this, ScreenToClient(event.GetPosition()) );
} }
#endif #endif
void Interface::OnContextMenu(wxMouseEvent& event) void Interface::OnContextMenu(wxMouseEvent& event)
{ {
if( p_intf->p_sys->pf_show_dialog ) 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->pf_show_dialog( p_intf, INTF_DIALOG_POPUPMENU, 0 );
//::PopupMenu( p_intf, this, event.GetPosition() );
} }
void Interface::OnExit( wxCommandEvent& WXUNUSED(event) ) void Interface::OnExit( wxCommandEvent& WXUNUSED(event) )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* timer.cpp : wxWindows plugin for vlc * timer.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * 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> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -97,24 +97,6 @@ void Timer::Notify() ...@@ -97,24 +97,6 @@ void Timer::Notify()
vlc_mutex_lock( &p_intf->change_lock ); 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 */ /* Update the input */
if( p_intf->p_sys->p_input == NULL ) if( p_intf->p_sys->p_input == NULL )
{ {
...@@ -301,7 +283,8 @@ static int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable, ...@@ -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; 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; return VLC_SUCCESS;
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* wxwindows.cpp : wxWindows plugin for vlc * wxwindows.cpp : wxWindows plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000-2001 VideoLAN * 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> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -129,7 +129,6 @@ static int Open( vlc_object_t *p_this ) ...@@ -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->i_slider_pos = p_intf->p_sys->i_slider_oldpos = 0;
p_intf->p_sys->p_popup_menu = NULL; p_intf->p_sys->p_popup_menu = NULL;
p_intf->p_sys->b_popup_change = VLC_FALSE;
p_intf->pf_show_dialog = NULL; p_intf->pf_show_dialog = NULL;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description * wxwindows.h: private wxWindows interface description
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * 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> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -86,7 +86,6 @@ struct intf_sys_t ...@@ -86,7 +86,6 @@ struct intf_sys_t
/* Popup menu */ /* Popup menu */
wxMenu *p_popup_menu; wxMenu *p_popup_menu;
vlc_bool_t b_popup_change;
}; };
#endif /* !defined(MODULE_NAME_IS_skins) */ #endif /* !defined(MODULE_NAME_IS_skins) */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* events.c: Windows DirectX video output events handler * events.c: Windows DirectX video output events handler
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * 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> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -196,8 +196,8 @@ void DirectXEventThread( event_thread_t *p_event ) ...@@ -196,8 +196,8 @@ void DirectXEventThread( event_thread_t *p_event )
} }
else else
{ {
/* exit application */ /* close video window */
p_event->p_vout->p_vlc->b_die = VLC_TRUE; PostMessage( msg.hwnd, WM_CLOSE, 0, 0 );
} }
break; break;
...@@ -660,10 +660,19 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message, ...@@ -660,10 +660,19 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
/* the user wants to close the window */ /* the user wants to close the window */
case WM_CLOSE: case WM_CLOSE:
msg_Dbg( p_vout, "WinProc WM_CLOSE" ); {
/* exit application */ playlist_t * p_playlist =
p_vout->p_vlc->b_die = VLC_TRUE; (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; return 0;
}
/* the window has been closed so shut down everything now */ /* the window has been closed so shut down everything now */
case WM_DESTROY: case WM_DESTROY:
...@@ -724,4 +733,3 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message, ...@@ -724,4 +733,3 @@ static long FAR PASCAL DirectXEventProc( HWND hwnd, UINT message,
return DefWindowProc(hwnd, message, wParam, lParam); 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