[Bf-blender-cvs] [667a5ef] master: Fix T48171: activating spacebar search menu over text button activates it or shows tooltip.

Brecht Van Lommel noreply at git.blender.org
Sun Apr 17 01:16:11 CEST 2016


Commit: 667a5ef48e5a0f9f20aecce06131516bb92d0f9b
Author: Brecht Van Lommel
Date:   Sun Apr 17 00:22:42 2016 +0200
Branches: master
https://developer.blender.org/rB667a5ef48e5a0f9f20aecce06131516bb92d0f9b

Fix T48171: activating spacebar search menu over text button activates it or shows tooltip.

===================================================================

M	source/blender/editors/interface/interface_handlers.c
M	source/blender/editors/interface/interface_regions.c
M	source/blender/windowmanager/intern/wm_event_system.c

===================================================================

diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index d59d293..6c96117 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -6537,7 +6537,6 @@ static void menu_add_shortcut_cancel(struct bContext *C, void *arg1)
 static void popup_change_shortcut_func(bContext *C, void *arg1, void *UNUSED(arg2))
 {
 	uiBut *but = (uiBut *)arg1;
-	UI_but_tooltip_timer_remove(C, but);
 	UI_popup_block_invoke(C, menu_change_shortcut, but);
 }
 
@@ -6559,7 +6558,6 @@ static void remove_shortcut_func(bContext *C, void *arg1, void *UNUSED(arg2))
 static void popup_add_shortcut_func(bContext *C, void *arg1, void *UNUSED(arg2))
 {
 	uiBut *but = (uiBut *)arg1;
-	UI_but_tooltip_timer_remove(C, but);
 	UI_popup_block_ex(C, menu_add_shortcut, NULL, menu_add_shortcut_cancel, but);
 }
 
@@ -6608,8 +6606,6 @@ static bool ui_but_menu(bContext *C, uiBut *but)
 		return false;
 	}
 	
-	UI_but_tooltip_timer_remove(C, but);
-
 	/* highly unlikely getting the label ever fails */
 	UI_but_string_info_get(C, but, &label, NULL);
 
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index abd395a..821d8b1 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -1965,11 +1965,17 @@ uiPopupBlockHandle *ui_popup_block_create(
         void *arg)
 {
 	wmWindow *window = CTX_wm_window(C);
+	uiBut *activebut = UI_context_active_but_get(C);
 	static ARegionType type;
 	ARegion *ar;
 	uiBlock *block;
 	uiPopupBlockHandle *handle;
 
+	/* disable tooltips from buttons below */
+	if (activebut) {
+		UI_but_tooltip_timer_remove(C, activebut);
+	}
+
 	/* create handle */
 	handle = MEM_callocN(sizeof(uiPopupBlockHandle), "uiPopupBlockHandle");
 
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 24d4144..d7ece0c 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -413,7 +413,7 @@ void wm_event_do_notifiers(bContext *C)
 static int wm_event_always_pass(wmEvent *event)
 {
 	/* some events we always pass on, to ensure proper communication */
-	return ISTIMER(event->type) || (event->type == WINDEACTIVATE) || (event->type == EVT_BUT_OPEN);
+	return ISTIMER(event->type) || (event->type == WINDEACTIVATE);
 }
 
 /* ********************* ui handler ******************* */




More information about the Bf-blender-cvs mailing list