Commit d0b795a5 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/*: fixed context menu problem on win32.
parent 48b74806
......@@ -2,7 +2,7 @@
* interface.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: interface.cpp,v 1.35 2003/05/26 19:06:47 gbazin Exp $
* $Id: interface.cpp,v 1.36 2003/05/27 11:35:34 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -139,10 +139,9 @@ BEGIN_EVENT_TABLE(Interface, wxFrame)
EVT_MENU_OPEN(Interface::OnMenuOpen)
#if defined( __WXMSW__ ) || defined( __WXMAC__ )
EVT_CONTEXT_MENU(Interface::OnContextMenu)
#else
EVT_RIGHT_UP(Interface::OnContextMenu)
EVT_CONTEXT_MENU(Interface::OnContextMenu2)
#endif
EVT_RIGHT_UP(Interface::OnContextMenu)
/* Toolbar events */
EVT_MENU(OpenFile_Event, Interface::OnOpenFile)
......@@ -539,16 +538,15 @@ void Interface::OnMenuOpen(wxMenuEvent& event)
}
#if defined( __WXMSW__ ) || defined( __WXMAC__ )
void Interface::OnContextMenu(wxContextMenuEvent& event)
void Interface::OnContextMenu2(wxContextMenuEvent& event)
{
::PopupMenu( p_intf, this, ScreenToClient(event.GetPosition()) );
}
#else
#endif
void Interface::OnContextMenu(wxMouseEvent& event)
{
::PopupMenu( p_intf, this, event.GetPosition() );
}
#endif
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.19 2003/05/26 19:06:47 gbazin Exp $
* $Id: timer.cpp,v 1.20 2003/05/27 11:35:34 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -123,14 +123,10 @@ void Timer::Notify()
{
wxPoint mousepos = wxGetMousePosition();
#if defined( __WXMSW__ ) || defined( __WXMAC__ )
wxContextMenuEvent event =
wxContextMenuEvent( wxEVT_NULL, 0, mousepos );
#else
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
p_main_interface->AddPendingEvent(event);
p_main_interface->b_popup_change = VLC_FALSE;
......
......@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: wxwindows.h,v 1.32 2003/05/26 19:06:47 gbazin Exp $
* $Id: wxwindows.h,v 1.33 2003/05/27 11:35:34 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -173,10 +173,9 @@ private:
void OnMenuOpen( wxMenuEvent& event );
#if defined( __WXMSW__ ) || defined( __WXMAC__ )
void OnContextMenu(wxContextMenuEvent& event);
#else
void OnContextMenu(wxMouseEvent& event);
void OnContextMenu2(wxContextMenuEvent& event);
#endif
void OnContextMenu(wxMouseEvent& event);
DECLARE_EVENT_TABLE();
......
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