Fix T58870: submenus don't open for some specific mouse positions.

This commit is contained in:
Brecht Van Lommel 2019-01-03 12:10:14 +01:00
parent 323543ae2e
commit 853a03c555
Notes: blender-bot 2023-02-14 08:42:53 +01:00
Referenced by issue #58870, Submenus don't open sometimes
1 changed files with 3 additions and 2 deletions

View File

@ -8012,13 +8012,14 @@ static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but)
}
case TIMER:
{
/* handle menu auto open timer */
/* Handle menu auto open timer. */
if (event->customdata == data->autoopentimer) {
WM_event_remove_timer(data->wm, data->window, data->autoopentimer);
data->autoopentimer = NULL;
if (ui_but_contains_point_px(ar, but, event->x, event->y))
if (ui_but_contains_point_px(ar, but, event->x, event->y) || but->active) {
button_activate_state(C, but, BUTTON_STATE_MENU_OPEN);
}
}
break;