]> git.sesse.net Git - vlc/commitdiff
* modules/gui/wxwindows/*: avoid queuing popup menu events while one is already...
authorGildas Bazin <gbazin@videolan.org>
Fri, 18 Jul 2003 13:22:07 +0000 (13:22 +0000)
committerGildas Bazin <gbazin@videolan.org>
Fri, 18 Jul 2003 13:22:07 +0000 (13:22 +0000)
modules/gui/wxwindows/wxwindows.cpp

index 1e1f6a8bd70114feb329a0c1ed7e8b5341310247..4f65d645c5cb5ca26dbdc5d1fcb4c51bd7cf5719 100644 (file)
@@ -2,7 +2,7 @@
  * wxwindows.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: wxwindows.cpp,v 1.19 2003/07/18 11:39:39 gbazin Exp $
+ * $Id: wxwindows.cpp,v 1.20 2003/07/18 13:22:07 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -285,5 +285,12 @@ static void ShowDialog( intf_thread_t *p_intf, int i_dialog_event, int i_arg )
 {
     wxCommandEvent event( wxEVT_DIALOG, i_dialog_event );
     event.SetInt( i_arg );
-    p_intf->p_sys->p_wxwindow->AddPendingEvent( event );
+
+    /* Hack to prevent popup events to be enqueued when
+     * one is already active */
+    if( i_dialog_event == INTF_DIALOG_POPUPMENU &&
+        !p_intf->p_sys->p_popup_menu )
+    {
+        p_intf->p_sys->p_wxwindow->AddPendingEvent( event );
+    }
 }