diff options
author | corvid <corvid@lavabit.com> | 2010-04-22 01:30:41 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2010-04-22 01:30:41 +0000 |
commit | 058a4701d0bef09d21658923e0b4a30e12643b8e (patch) | |
tree | 30af5bb95c6fa73c09b3e5394e31329df7ed7843 /dw/widget.cc | |
parent | d20fe82191d472b3073b793aee4508323a95b075 (diff) |
move generic tooltip enter/leave to Widget
Technically, Textblock's notifyImpl()s should probably call the Widget
one as well. It doesn't matter currently, since we don't look
for title attrs on elements that correspond to entire Textblocks.
Diffstat (limited to 'dw/widget.cc')
-rw-r--r-- | dw/widget.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/dw/widget.cc b/dw/widget.cc index 670e2c43..fb0d29e0 100644 --- a/dw/widget.cc +++ b/dw/widget.cc @@ -594,12 +594,20 @@ bool Widget::motionNotifyImpl (EventMotion *event) return false; } -void Widget::enterNotifyImpl (EventCrossing *event) +void Widget::enterNotifyImpl (EventCrossing *) { + core::style::Tooltip *tooltip = getStyle()->x_tooltip; + + if (tooltip) + tooltip->onEnter(); } -void Widget::leaveNotifyImpl (EventCrossing *event) +void Widget::leaveNotifyImpl (EventCrossing *) { + core::style::Tooltip *tooltip = getStyle()->x_tooltip; + + if (tooltip) + tooltip->onLeave(); } void Widget::removeChild (Widget *child) |