undo nested clip bug, wheel zoom redraw fix, uninited vars, shortcuts doc
[goodguy/history.git] / cinelerra-5.1 / guicast / bcpopupmenu.C
index 8421a6bf46ef675f8a8ae11cbd173b1f976a022c..4c639fe27d25890f96bd4289cc77c21c651ca569 100644 (file)
@@ -26,7 +26,7 @@
 #include "bcpopupmenu.h"
 #include "bcresources.h"
 #include "bcsignals.h"
-#include "colors.h"
+#include "bccolors.h"
 #include "fonts.h"
 #include <string.h>
 #include "vframe.h"
@@ -369,6 +369,7 @@ int BC_PopupMenu::repeat_event(int64_t duration)
 
 int BC_PopupMenu::button_press_event()
 {
+       int result = 0;
        if(get_buttonpress() == 1 &&
                is_event_win() &&
                use_title)
@@ -404,17 +405,18 @@ int BC_PopupMenu::button_press_event()
 
                BC_MenuItem *tmp = menu_popup->menu_items.values[theval];
                set_text(tmp->get_text());
-               if (!tmp->handle_event())
-                       this->handle_event();
+               result = tmp->handle_event();
+               if( !result )
+                       result = this->handle_event();
        }
        if(popup_down)
        {
 // Menu is down so dispatch to popup.
                menu_popup->dispatch_button_press();
-               return 1;
+               result = 1;
        }
 
-       return 0;
+       return result;
 }
 
 int BC_PopupMenu::button_release_event()
@@ -473,7 +475,7 @@ int BC_PopupMenu::cursor_leave_event()
        if( popup_down ) {
                if( !get_button_down() && !menu_popup->cursor_inside() ) {
                        status = BUTTON_UP;
-                       deactivate_menu();
+//                     deactivate_menu();
                }
                menu_popup->dispatch_cursor_leave();
        }