changeset 17087:4a56f15dee5f

Fix popup menu problems: GTK cannot get a grab while the button is down, so show it on button release instead of button press.
author reimar
date Sun, 04 Dec 2005 15:58:52 +0000
parents c8bad98f63b5
children f067a9de373c
files Gui/mplayer/mw.c Gui/mplayer/pb.c Gui/mplayer/sw.c Gui/mplayer/widgets.c
diffstat 4 files changed, 3 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/mplayer/mw.c	Sun Dec 04 15:56:40 2005 +0000
+++ b/Gui/mplayer/mw.c	Sun Dec 04 15:58:52 2005 +0000
@@ -443,7 +443,7 @@
           itemtype=0;
           break;
 
-   case wsPRMouseButton:
+   case wsRRMouseButton:
         gtkShow( evShowPopUpMenu,NULL );
         break;
 
--- a/Gui/mplayer/pb.c	Sun Dec 04 15:56:40 2005 +0000
+++ b/Gui/mplayer/pb.c	Sun Dec 04 15:58:52 2005 +0000
@@ -121,7 +121,7 @@
    case wsRMMouseButton:
         mplHideMenu( RX,RY,0 );
         break;
-   case wsPRMouseButton:
+   case wsRRMouseButton:
         gtkShow( evShowPopUpMenu,NULL );
 	break;
 // ---
--- a/Gui/mplayer/sw.c	Sun Dec 04 15:56:40 2005 +0000
+++ b/Gui/mplayer/sw.c	Sun Dec 04 15:58:52 2005 +0000
@@ -47,7 +47,7 @@
 
  switch( Button )
   {
-   case wsPRMouseButton:
+   case wsRRMouseButton:
           gtkShow( evShowPopUpMenu,NULL );
           break;
    case wsPMMouseButton:
--- a/Gui/mplayer/widgets.c	Sun Dec 04 15:56:40 2005 +0000
+++ b/Gui/mplayer/widgets.c	Sun Dec 04 15:58:52 2005 +0000
@@ -217,15 +217,7 @@
 	  gtk_widget_destroy( PopUpMenu );
 	 }
         PopUpMenu=create_PopUpMenu();
-#ifdef HAVE_GTK2_GUI
-        // Ugly hack, but we don't want to loose events
-        while(!GTK_WIDGET_VISIBLE(PopUpMenu)) {
-           gtk_menu_popup(GTK_MENU(PopUpMenu), NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time());
-           gtk_main_iteration();
-        }
-#else
         gtk_menu_popup( GTK_MENU( PopUpMenu ),NULL,NULL,NULL,NULL,0,0 );
-#endif //HAVE_GTK2_GUI
         break;
    case evHidePopUpMenu:
         if ( PopUpMenu )