diff options
-rw-r--r-- | dw/image.cc | 10 | ||||
-rw-r--r-- | dw/ui.cc | 2 | ||||
-rw-r--r-- | dw/widget.cc | 12 |
3 files changed, 14 insertions, 10 deletions
diff --git a/dw/image.cc b/dw/image.cc index 13212cdc..cab40ed5 100644 --- a/dw/image.cc +++ b/dw/image.cc @@ -247,28 +247,22 @@ void Image::enterNotifyImpl (core::EventCrossing *event) { // BUG: this is wrong for image maps, but the cursor position is unknown. currLink = getStyle()->x_link; - core::style::Tooltip *tooltip = getStyle()->x_tooltip; if (currLink != -1) { (void) layout->emitLinkEnter (this, currLink, -1, -1, -1); } - if (tooltip) { - tooltip->onEnter(); - } + Widget::enterNotifyImpl(event); } void Image::leaveNotifyImpl (core::EventCrossing *event) { - core::style::Tooltip *tooltip = getStyle()->x_tooltip; clicking = false; if (currLink != -1) { currLink = -1; (void) layout->emitLinkEnter (this, -1, -1, -1, -1); } - if (tooltip) { - tooltip->onLeave(); - } + Widget::leaveNotifyImpl(event); } /* @@ -62,11 +62,13 @@ void Embed::sizeAllocateImpl (Allocation *allocation) void Embed::enterNotifyImpl (core::EventCrossing *event) { resource->emitEnter(); + Widget::enterNotifyImpl(event); } void Embed::leaveNotifyImpl (core::EventCrossing *event) { resource->emitLeave(); + Widget::leaveNotifyImpl(event); } bool Embed::buttonPressImpl (core::EventButton *event) 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) |