diff options
Diffstat (limited to 'source/blender/windowmanager/intern/wm_tooltip.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_tooltip.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_tooltip.c b/source/blender/windowmanager/intern/wm_tooltip.c index 0953351de2b..58c657bf116 100644 --- a/source/blender/windowmanager/intern/wm_tooltip.c +++ b/source/blender/windowmanager/intern/wm_tooltip.c @@ -37,9 +37,24 @@ #include "WM_api.h" #include "WM_types.h" +void WM_tooltip_immediate_init( + bContext *C, wmWindow *win, ARegion *ar, + wmTooltipInitFn init) +{ + WM_tooltip_timer_clear(C, win); + + bScreen *screen = WM_window_get_active_screen(win); + if (screen->tool_tip == NULL) { + screen->tool_tip = MEM_callocN(sizeof(*screen->tool_tip), __func__); + } + screen->tool_tip->region_from = ar; + screen->tool_tip->init = init; + WM_tooltip_init(C, win); +} + void WM_tooltip_timer_init( bContext *C, wmWindow *win, ARegion *ar, - wmTooltipInitFn init, bool quick) + wmTooltipInitFn init) { WM_tooltip_timer_clear(C, win); @@ -50,7 +65,7 @@ void WM_tooltip_timer_init( } screen->tool_tip->region_from = ar; screen->tool_tip->timer = WM_event_add_timer( - wm, win, TIMER, quick ? UI_TOOLTIP_DELAY_QUICK : UI_TOOLTIP_DELAY); + wm, win, TIMER, UI_TOOLTIP_DELAY); screen->tool_tip->init = init; } |