[CinCV TNG] [PATCH] Add parameter init_releases to BC_PopupMenu::activate_menu

Johannes Sixt j6t at kdbg.org
Sat Aug 26 10:46:45 CEST 2017


Am 24.08.2017 um 23:20 schrieb Einar R√ľnkaru:
> Initial count of button releases. Context popup menu sees initializing
> mouse button release. Popup menu actvated by window button does not
> see this.
> ---
>   guicast/bcpopupmenu.C | 4 ++--
>   guicast/bcpopupmenu.h | 2 +-
>   2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/guicast/bcpopupmenu.C b/guicast/bcpopupmenu.C
> index 5913035..1b45930 100644
> --- a/guicast/bcpopupmenu.C
> +++ b/guicast/bcpopupmenu.C
> @@ -272,7 +272,7 @@ int BC_PopupMenu::deactivate()
>   	return 0;
>   }
>   
> -int BC_PopupMenu::activate_menu()
> +int BC_PopupMenu::activate_menu(int init_releases)
>   {
>   	if(!popup_down)
>   	{
> @@ -289,7 +289,7 @@ int BC_PopupMenu::activate_menu()
>   			button_press_y = top_level->cursor_y;
>   		}
>   
> -		button_releases = 0;
> +		button_releases = init_releases;
>   		if(use_title)
>   		{
>   			Window tempwin;
> diff --git a/guicast/bcpopupmenu.h b/guicast/bcpopupmenu.h
> index 8b167a6..f980207 100644
> --- a/guicast/bcpopupmenu.h
> +++ b/guicast/bcpopupmenu.h
> @@ -68,7 +68,7 @@ public:
>   	int draw_title();
>   	int reposition_window(int x, int y);
>   	int deactivate();
> -	int activate_menu();
> +	int activate_menu(int init_releases = 0);
>   	int deactivate_menu();
>   	int focus_out_event();
>   	int repeat_event(int64_t duration);

Is there a caller that uses the new interface?

-- Hannes


More information about the Cinelerra mailing list