diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-06-11 04:43:48 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-06-11 05:04:03 +0300 |
commit | 6868202899824a46ee28eb02df74efd76f6e3503 (patch) | |
tree | 406691340feb9642473a0fb8485349e6d225fa9e /source/blender/windowmanager/intern/wm_tooltip.c | |
parent | a0608340ae14363fb865b4f7d449c77176f953ac (diff) |
Fix T62875: Tooltips behave erratically with view gizmos
Improvements to behavior for gizmo tool-tips.
- 2D gizmos no longer cancel tool-tips on cursor motion
(matching the behavior of UI widgets).
- 3D gizmos still close on motion since 3D gizmos may have a large
on-screen area which would cause them to stay visible even after the
cursor has been moved a large distance. The motion threshold is used
so they don't close on unintended cursor motion.
- Changing highlighted gizmo now cancels the tool-tip & resets the timer.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_tooltip.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_tooltip.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_tooltip.c b/source/blender/windowmanager/intern/wm_tooltip.c index fb56b2ef23f..3a219d7a573 100644 --- a/source/blender/windowmanager/intern/wm_tooltip.c +++ b/source/blender/windowmanager/intern/wm_tooltip.c @@ -22,6 +22,7 @@ #include "MEM_guardedalloc.h" +#include "BLI_math_vector.h" #include "BLI_utildefines.h" #include "BKE_context.h" @@ -116,6 +117,7 @@ void WM_tooltip_init(bContext *C, wmWindow *win) &screen->tool_tip->pass, &pass_delay, &screen->tool_tip->exit_on_event); + copy_v2_v2_int(screen->tool_tip->event_xy, &win->eventstate->x); if (pass_prev != screen->tool_tip->pass) { /* The pass changed, add timer for next pass. */ wmWindowManager *wm = CTX_wm_manager(C); |