From: Gildas Bazin Date: Tue, 27 May 2003 11:35:34 +0000 (+0000) Subject: * modules/gui/wxwindows/*: fixed context menu problem on win32. X-Git-Tag: 0.6.0~179 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=d0b795a5cc36f394a618c784b0cbb6b5e3fcf91b;p=vlc * modules/gui/wxwindows/*: fixed context menu problem on win32. --- diff --git a/modules/gui/wxwindows/interface.cpp b/modules/gui/wxwindows/interface.cpp index cad7e9365c..483a9bca48 100644 --- a/modules/gui/wxwindows/interface.cpp +++ b/modules/gui/wxwindows/interface.cpp @@ -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 * @@ -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) ) { diff --git a/modules/gui/wxwindows/timer.cpp b/modules/gui/wxwindows/timer.cpp index 4b75af8d41..600e431048 100644 --- a/modules/gui/wxwindows/timer.cpp +++ b/modules/gui/wxwindows/timer.cpp @@ -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 * @@ -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; diff --git a/modules/gui/wxwindows/wxwindows.h b/modules/gui/wxwindows/wxwindows.h index 7881b592e7..54e37809a5 100644 --- a/modules/gui/wxwindows/wxwindows.h +++ b/modules/gui/wxwindows/wxwindows.h @@ -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 * @@ -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();