Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Parborg <darkdefende@gmail.com>2019-07-31 20:10:44 +0300
committerSebastian Parborg <darkdefende@gmail.com>2019-07-31 20:16:47 +0300
commitf7c13f2d761a1938a96c6435055c4308504527ff (patch)
tree75eb6742d3f35e906eff86af8c3e34e383971324 /source/blender/editors/interface/interface_handlers.c
parent81d4cf5f5a1d7db95f9cd75f32f5ec40252a609f (diff)
Revert "UI: remove checks for other popovers when switching menu"
This reverts commit 77616571292ab1eeb9805797bfdd4525cc306923. This commit broke overlapping popovers. For example in the color management tab it would be impossible to select and of the popover alternatives as it would switch to the menu button under the cursor.
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r--source/blender/editors/interface/interface_handlers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index d48d674f7a3..245277c8d22 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -10112,6 +10112,7 @@ static int ui_handler_region_menu(bContext *C, const wmEvent *event, void *UNUSE
but = ui_region_find_active_but(ar);
if (but) {
+ bScreen *screen = CTX_wm_screen(C);
uiBut *but_other;
uiHandleButtonData *data;
@@ -10122,6 +10123,8 @@ static int ui_handler_region_menu(bContext *C, const wmEvent *event, void *UNUSE
/* Make sure this popup isn't dragging a button.
* can happen with popovers (see T67882). */
(ui_region_find_active_but(data->menu->region) == NULL) &&
+ /* make sure mouse isn't inside another menu (see T43247) */
+ (ui_screen_region_find_mouse_over(screen, event) == NULL) &&
(ELEM(but->type, UI_BTYPE_PULLDOWN, UI_BTYPE_POPOVER, UI_BTYPE_MENU)) &&
(but_other = ui_but_find_mouse_over(ar, event)) && (but != but_other) &&
(ELEM(but_other->type, UI_BTYPE_PULLDOWN, UI_BTYPE_POPOVER, UI_BTYPE_MENU))) {