From: Good Guy Date: Tue, 1 Mar 2016 20:59:37 +0000 (-0700) Subject: prevent popup deactivation while button_down X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=52fcc46226f9df46f9ce9d0566dc568455a7db0b;p=goodguy%2Fhistory.git prevent popup deactivation while button_down --- diff --git a/cinelerra-5.0/guicast/bcpopupmenu.C b/cinelerra-5.0/guicast/bcpopupmenu.C index 5adeed4c..3b7407d5 100644 --- a/cinelerra-5.0/guicast/bcpopupmenu.C +++ b/cinelerra-5.0/guicast/bcpopupmenu.C @@ -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(); }