prevent popup deactivation while button_down
authorGood Guy <[email protected]>
Tue, 1 Mar 2016 20:59:37 +0000 (13:59 -0700)
committerGood Guy <[email protected]>
Tue, 1 Mar 2016 20:59:37 +0000 (13:59 -0700)
cinelerra-5.0/guicast/bcpopupmenu.C

index 5adeed4c37b21b7c60548e14eae5dcb22ca70ef3..3b7407d5408c4caafde4ecdb0176a3f925bfe711 100644 (file)
@@ -330,7 +330,8 @@ int BC_PopupMenu::reposition_window(int x, int y)
 
 int BC_PopupMenu::focus_out_event()
 {
-       if( popup_down && !menu_popup->cursor_inside() )
+       if( popup_down && !get_button_down() &&
+           !cursor_inside() && !menu_popup->cursor_inside() )
                deactivate();
        return 0;
 }
@@ -507,9 +508,8 @@ int BC_PopupMenu::cursor_leave_event()
        }
 
 // dispatch to popup
-       if(popup_down)
-       {
-               if( !menu_popup->cursor_inside() )
+       if( popup_down ) {
+               if( !get_button_down() && !menu_popup->cursor_inside() )
                        deactivate_menu();
                menu_popup->dispatch_cursor_leave();
        }