diff options
author | Steve Fryatt <stevef@netsurf-browser.org> | 2014-01-28 23:58:42 +0000 |
---|---|---|
committer | Steve Fryatt <stevef@netsurf-browser.org> | 2014-01-28 23:58:42 +0000 |
commit | 654b25ffa1bab41d346f3c55b9257750cd515b78 (patch) | |
tree | f327abb6c9f5b716095c0893b91c7b6730b6e79e /riscos/menus.c | |
parent | 7cb0619fe8c39d189dbcfa4ecbd0db573ff250e6 (diff) | |
download | netsurf-654b25ffa1bab41d346f3c55b9257750cd515b78.tar.gz netsurf-654b25ffa1bab41d346f3c55b9257750cd515b78.tar.bz2 |
Improve handling of Message_MenusDeleted so that we don't close whatever menu tree is open at the time.
Diffstat (limited to 'riscos/menus.c')
-rw-r--r-- | riscos/menus.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/riscos/menus.c b/riscos/menus.c index 29d514122..91232a160 100644 --- a/riscos/menus.c +++ b/riscos/menus.c @@ -118,6 +118,7 @@ wimp_menu *image_quality_menu, *proxy_type_menu, *languages_menu; /** * Create menu structures. */ + void ro_gui_menu_init(void) { /* image quality menu */ @@ -439,6 +440,28 @@ void ro_gui_menu_warning(wimp_message_menu_warning *warning) } } + +/** + * Handle Message_MenusDeleted, removing our current record of an open menu + * if it matches the deleted menu handle. + * + * \param *deleted The message block. + */ + +void ro_gui_menu_message_deleted(wimp_message_menus_deleted *deleted) +{ + if (deleted != NULL && deleted->menu == current_menu) { + ro_gui_wimp_event_menus_closed(current_menu_window, + current_menu_icon, current_menu); + + current_menu = NULL; + current_menu_window = NULL; + current_menu_icon = 0; + current_menu_open = false; + } +} + + /** * Update the current menu by sending it a Menu Prepare event through wimp_event * and then reopening it if the contents has changed. |