Correct another issue in recent menu handling

mouse clicks to exit a menu were ignored for non-floating popups
This commit is contained in:
Campbell Barton
2014-08-06 00:05:20 +10:00
parent 4071719ae7
commit 4c3b25ec9e

View File

@@ -7885,6 +7885,9 @@ static int ui_handle_menu_button(bContext *C, const wmEvent *event, uiPopupBlock
if (event->val == KM_RELEASE) {
/* pass, needed so we can exit active menu-items when click-dragging out of them */
}
else if (!ui_mouse_inside_region(but->active->region, event->x, event->y)) {
/* pass, needed to click-exit outside of non-flaoting menus */
}
else if ((event->type != MOUSEMOVE) && ISMOUSE(event->type)) {
if (!ui_mouse_inside_button(but->active->region, but, event->x, event->y)) {
but = NULL;