diff options
author | Michael Jennings <mej@kainx.org> | 2000-05-04 03:54:28 +0000 |
---|---|---|
committer | Michael Jennings <mej@kainx.org> | 2000-05-04 03:54:28 +0000 |
commit | e6facd5833ffa97a6728448a0f413d43f323722c (patch) | |
tree | 3a7b735132a2bb4cd2302ecd8df56ced572f502d /src/menus.c | |
parent | 8d2b2125c33b00b1d7b9070535a5471adfb9d175 (diff) | |
download | eterm-e6facd5833ffa97a6728448a0f413d43f323722c.tar.gz |
Wed May 3 21:04:37 PDT 2000 Michael Jennings <mej@eterm.org>
Fixed a bug in the handling of resize events thanks to a tip from
Teodor Zlatanov <tzz@iglou.com>. While I was at it, I also fixed a
couple remaining issues with the popup menu system. You shouldn't
get any more cases where items remain selected after you've moved your
mouse off of the menu, or where a submenu would stay up even though
another menuitem is selected.
SVN revision: 2594
Diffstat (limited to 'src/menus.c')
-rw-r--r-- | src/menus.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/menus.c b/src/menus.c index 42a667a..a529f2a 100644 --- a/src/menus.c +++ b/src/menus.c @@ -357,6 +357,9 @@ menu_handle_motion_notify(event_t * ev) current_menu->state |= MENU_STATE_IS_DRAGGING; } item = find_item_by_coords(current_menu, ev->xbutton.x, ev->xbutton.y); + if (!item || item != menuitem_get_current(current_menu)) { + menu_reset_submenus(current_menu); + } menuitem_change_current(item); } else { /* Motion outside the current menu */ @@ -383,6 +386,8 @@ menu_handle_motion_notify(event_t * ev) menu_reset_submenus(current_menu); } menuitem_change_current(item); + } else if (!menu) { + menuitem_change_current(NULL); } } |